-
Notifications
You must be signed in to change notification settings - Fork 3.8k
tune(monaco-editor-webpack-plugin): replace editor.main.js #2865
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
base: main
Are you sure you want to change the base?
Conversation
8aef849
to
b7006c1
Compare
Thanks for your PR! Can you please open an issue to describe the problem that this PR fixes? |
Should I open an issue with text from the first comment or should I describe something more fully? |
Please also describe what you mean with "does not work as expected". Thank you! |
Maybe also need to change this line monaco-editor/webpack-plugin/src/index.ts Line 315 in a385674
editor.main.js
|
Great idea! To test this change, we adopted the smoke-test to import Thank you! |
👍 👀 |
Any chance we can bring this in? We deploy with our own custom language and it's unfortunate to be forced to bundle 89 languages along with it. Alternatively, does someone have a reasonable workaround for the time being? |
We have the same issue, would be great to fix it. |
It would be great to have this merged so please don't forget about this PR. |
Replace editor.main.js with editor.api.js and requested features and languages
BREAKING CHANGES: if a project contains only these imports for creating editor: ``` import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'; const editor = monaco.editor.create(...); ``` `monaco-editor-webpack-plugin` will not add features and languages. When creating editor, monaco must be imported from package itself: ``` import * as monaco from 'monaco-editor'; const editor = monaco.editor.create(...); ```
97fdb73
to
2d60530
Compare
Usually editor functionality used as:
this resolves to
./esm/vs/editor/editor.main.js
in package.json.editor.main.js
includes all feature and languages. Because of this,webpack-plugin
does not work as expected.This PR proposes replacing
editor.main.js
witheditor.api.js
and requested features and languages.Closes #2874