-
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] esm build does not have .js suffix #4716
Comments
I tried to use Service Worker to intercept the request, but some code like How about build monaco-editor both esm-bundler and esm-browser just like vue does. The vue seems use rollup to build both esm-bundler and esm-browser output. sw.js
|
I have also noticed that some similar work is doing in the vscode project, see microsoft/vscode#226260. |
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
n.a.
Monaco Editor Playground Code
n.a.
Reproduction Steps
I want to use esm build of monaco editor in pure frontend html, means without bundler like webpack, vite and without server.
The following is the demo code I wrote, The following code in browser doesn't work due the import file is not end with
.js
suffix.Here is the demo code
demo code
I have tried to use https://github.com/guybedford/es-module-shims or https://github.com/systemjs/systemjs, but none of them works for me.
Actual (Problematic) Behavior
The url of import module doesn't end with .js, so the static server will not work as expected.
Expected Behavior
The import of esm build should end with .js to make it work for pure browser.
Additional Context
No response
The text was updated successfully, but these errors were encountered: