Skip to content
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

Esbuild doesn't minify assets by default #3405

Open
murny opened this issue Mar 4, 2024 · 0 comments
Open

Esbuild doesn't minify assets by default #3405

murny opened this issue Mar 4, 2024 · 0 comments

Comments

@murny
Copy link
Contributor

murny commented Mar 4, 2024

One little change from moving from webpack to esbuild, is the fact that esbuild doesn't minify assets by default?

It's not a huge issue, but asset sizes have gone up a little as a result in production:

  • application.css went from ~270KB to ~335KB
  • application.js went from ~800KB to ~1.6 MB
  • admin.js went from ~95KB to ~7KB (this is more to do with webpack and how they are rebundling all the libraries again in the separate packs. ESbuild doesn't do this, hence the massive savings.)

This should be a simple fix (think it just needs a --minify flag), but requires some investigation on the best way to do this.

More info: https://github.com/rails/jsbundling-rails/wiki#different-builds-for-production-and-developmenttest-environments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant