-
Notifications
You must be signed in to change notification settings - Fork 564
fix(form/Editor): only use the bundled monaco editor #3169
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: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue with the Monaco Editor integration by ensuring only the bundled Monaco Editor is used instead of potentially mixing different versions. The changes remove the dynamic Monaco setup and implement a static initialization approach.
- Removes dynamic Monaco setup function and implements static initialization
- Updates import statements to use the bundled Monaco editor directly
- Removes the
beforeMount
callback that was causing potential version conflicts
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Will this make the build artifacts larger? |
@bzp2010 I tried packing it up and found that there are indeed many unused ones that are not useful, so let me see how to deal with it.(Although they are not bigger than antd) |
@bzp2010 I've added manual chunks to determine the size occupied by Monaco.
We will find that the size of the Monaco editor starts from (gzip: 5.75 kB) to (gzip: 846.12 kB). But I think the Monaco editor part is necessary for now. As for the size, there might be ways to further reduce the size, but I don't have time to research further at the moment.(We might as well consider removing parts of antd.) ![]() Manual chunks will optimize the first screen loading to some extent, and I've decided to keep it in this PR. |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
Ensure that only the bundled Monaco is used.
Related issues
fix/resolve #3167
Checklist: