-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Bug] Cannot read properties of undefined (reading 'toUrl') #4739
Comments
I used Vite, but it doesn't work. |
Same issue in rspack. self.MonacoEnvironment = {
getWorker: function (moduleId, label) {
if (label === 'json') {
return new Worker(
new URL(
'monaco-editor/esm/vs/language/json/json.worker',
import.meta.url
)
);
}
if (label === 'css' || label === 'scss' || label === 'less') {
return new Worker(
new URL('monaco-editor/esm/vs/language/css/css.worker', import.meta.url)
);
}
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return new Worker(
new URL(
'monaco-editor/esm/vs/language/html/html.worker',
import.meta.url
)
);
}
if (label === 'typescript' || label === 'javascript') {
return new Worker(
new URL(
'monaco-editor/esm/vs/language/typescript/ts.worker',
import.meta.url
)
);
}
return new Worker(
new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url)
);
},
}; |
I tried downgrading to 0.50.0 and it solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
why
Monaco Editor Playground Code
No response
Reproduction Steps
No response
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: