-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: Unexpected usage #1384
Labels
Comments
My solution: Configure webpack-plugin in vue.config.js, instead of webpack.config.js:
|
Maybe you use the unmatched model id, in my case: window.MonacoEnvironment = {
getWorkerUrl: function (moduleId, label) {
if (label === 'json') {
return BASE_WORKER_PATH + './json.worker.bundle.js'
}
if (label === 'css' || label === 'scss') { // FIX SCSS Uncaught Error: Unexpected usage
return BASE_WORKER_PATH + './css.worker.bundle.js'
}
if (label === 'html') {
return BASE_WORKER_PATH + './html.worker.bundle.js'
}
if (label === 'typescript' || label === 'javascript') {
return BASE_WORKER_PATH + './ts.worker.bundle.js'
}
return BASE_WORKER_PATH + './editor.worker.bundle.js'
}
} |
Duplicate of #1385 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uncaught Error: Unexpected usage
Error: Unexpected usage
at EditorSimpleWorkerImpl.BaseEditorSimpleWorker.loadForeignModule (editorSimpleWorker.js?8c76:468)
at eval (webWorker.js?a9b4:39)
at eval (errors.js?0f90:57)
The text was updated successfully, but these errors were encountered: