-
Notifications
You must be signed in to change notification settings - Fork 11
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
monaco minification #4
Comments
Oh wow! This seems like a very easy win so yes I would indeed be interested.. perhaps we could try get esbuild to do it as we already have that as a dependency on this project (also its super fast)? |
I tried building monaco editor with esbuild, but building the workers didn't work. these are the build commands: and these are the resulting pre-built minified files (which you may directly include, instead of the |
Thanks for looking into this! Can you confirm at all how many bytes this saved? |
roughly speaking, if we look to the This includes everything including html, css, json and typescript workers if we look into typescript worker only so, in addition to the size reduction, you can also save lots of http requests for the large number of files required. The nice thing is that you would only need to change the import statement to point to the new directory and everything should just work. If you think this is a good idea, I can submit a PR for that. |
I have noticed that monaco editor dynamically loads lots of files. some of these files are quite large (e.g. the uncompressed size of typescriptServices.js is 7.4 mb)
would you consider minifying all the files in monaco directory?
I have tried that with uglifyjs-folder using the command
caution: this does in-place minification of all the js files in the folder.
The resulting size was less than third and it kept working with no modification of code
would you consider something like that?
The text was updated successfully, but these errors were encountered: