languageFeatures.js?810d:85 Error: Unexpected usage
at EditorSimpleWorkerImpl.BaseEditorSimpleWorker.loadForeignModule (editorSimpleWorker.js?8c76:468)
at eval (webWorker.js?a9b4:39)
Looking for a solution...
My solution: Configure webpack-plugin in vue.config.js, instead of webpack.config.js:
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')
module.exports = {
configureWebpack: {
plugins: [
new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
languages: ['javascript', 'css', 'html', 'typescript', 'json']
})
]
}
same issue here when treating with json
@soneway Have you resolved your issue?
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
Can this be reopened please?
@Symbolk do you understand why making that changed fixed anything?
My solution: Configure webpack-plugin in vue.config.js, instead of webpack.config.js:
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin') module.exports = { configureWebpack: { plugins: [ new MonacoWebpackPlugin({ // available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options languages: ['javascript', 'css', 'html', 'typescript', 'json'] }) ] }
when i use this solution 锛宻ee https://github.com/microsoft/monaco-editor-webpack-plugin/issues/96
Most helpful comment
My solution: Configure webpack-plugin in vue.config.js, instead of webpack.config.js: