[Bug] monaco-editor v0.31.1 not work with vue cli v4.5.15 #3687
Replies: 24 comments
-
when i use monaco-editor v0.30.1, works fine |
Beta Was this translation helpful? Give feedback.
-
I have this problem,too |
Beta Was this translation helpful? Give feedback.
-
The issue seems to be related to webpack version. In vue-cli v4.5.x,they use webpack 4. monaco-editor v0.31.1 not work. In vue-cli v5.0.x,they use webpack 5. monaco-editor v0.31.1 work good. Maybe monaco can provide a recommended webpack version? or prompt 0.31.1 version no longer supports vue-cli4 |
Beta Was this translation helpful? Give feedback.
-
@KKKZOZ nihao!You might be able to try vue-cli 5.0.0. this works for me. |
Beta Was this translation helpful? Give feedback.
-
哈哈哈哈你好你好 |
Beta Was this translation helpful? Give feedback.
-
🌿 |
Beta Was this translation helpful? Give feedback.
-
Surprise!哈哈哈哈 |
Beta Was this translation helpful? Give feedback.
-
Issue #2915 also relates to this. |
Beta Was this translation helpful? Give feedback.
-
react webpack4
|
Beta Was this translation helpful? Give feedback.
-
The same problem
|
Beta Was this translation helpful? Give feedback.
-
我也碰到同样问题了,vue-cli升级到5.0,也不行,你解决了么? |
Beta Was this translation helpful? Give feedback.
-
这是我的相应配置,可以正常使用
相关版本 |
Beta Was this translation helpful? Give feedback.
-
谢谢,老工程vue/cli是4.5的,升级到5.0以后,包括你上面列举的这些包,都升级了还是不行,但是我测试了下直接用5.0版本的vue/cli创建的新工程接入monaco,是正常的,估计还有其他的包在影响,已经准备用新的工程文件+复制老代码处理了 |
Beta Was this translation helpful? Give feedback.
-
我大概猜测是因为新版vue.config.js中的transpileDependencies: true 你试试手动打开? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
老vue 项目编译通过了, 降低 moncao 版本就可以编译了
|
Beta Was this translation helpful? Give feedback.
-
monaco-editor-webpack-plugin 要用 7.0.1 |
Beta Was this translation helpful? Give feedback.
-
{
test: /monaco-editor\/.*\.js/,
loader: "babel-loader"
} Add babel loader for |
Beta Was this translation helpful? Give feedback.
-
For those like me who aren't sure where to put this, I put it in the vue.config.js
|
Beta Was this translation helpful? Give feedback.
-
vuecli5.0.8 is no problem, however. 0.34.0 will have other problems, there is no problem below 0.33.0
|
Beta Was this translation helpful? Give feedback.
-
#2903 Someone in here has solved this kind of problem, it's es6 syntax problem
I use [email protected]
|
Beta Was this translation helpful? Give feedback.
-
this works for me, I downgraded versions of monaco-editor and monaco-editor-webpack-plugin in vue project, this works for me. |
Beta Was this translation helpful? Give feedback.
-
My monaco-editor version is:
and I tried to put this in my vue.config.js
It didn't work.
It works! Thank God. |
Beta Was this translation helpful? Give feedback.
-
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
No response
Actual Behavior
Expected Behavior
Load editor in div
Additional Context
Beta Was this translation helpful? Give feedback.
All reactions