The usage of the monaco-editor package in the project is relatively low, but its package files are quite large, affecting the efficiency of the initial screen loading.
If using the minified version of the monaco-editor, it will cause the window to mount the define method, impacting the loading of other UMD files in the project.
Approach
It is expected to add a getMonaco method in @monaco-editor/loader to asynchronously obtain monaco.
Background
The usage of the monaco-editor package in the project is relatively low, but its package files are quite large, affecting the efficiency of the initial screen loading. If using the minified version of the monaco-editor, it will cause the window to mount the define method, impacting the loading of other UMD files in the project.
Approach
It is expected to add a
getMonaco
method in@monaco-editor/loader
to asynchronously obtainmonaco
.Code