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

Replace webpacker with esbuild #1128

Merged
merged 9 commits into from
Sep 25, 2023
Merged

Replace webpacker with esbuild #1128

merged 9 commits into from
Sep 25, 2023

Conversation

jim
Copy link
Member

@jim jim commented Sep 17, 2023

What it does

This replaces the use of webpacker for bundling JavaScript and CSS with a combination of esbuild for JS and DartSass for CSS.

Why it is important

  • The current webpacker config means that rebuilding the JS is pretty slow.
  • Rails has deprecated webpacker and future energy is directed in other directions. This change aligns the project with upstream efforts.

Implementation notes

  • We were previously using browserlist's defaults to translate new JS features into backward-compatible forms. With esbuild, the options are more limited. Using --target=chrome58,firefox57,safari11 to restrict what JS features are used should be OK for now and is more conservative than what we were shipping before.

Your bandwidth for additional changes to this PR

Please choose one of the following to help the project maintainers provide the appropriate level of support:

  • I have the time and interest to make additional changes to this PR based on feedback.
  • I am interested in feedback but don't need to make the changes myself.
  • I don't have time or interest in making additional changes to this work.
  • Other or not sure (please describe):

@jim jim merged commit ed75cfa into main Sep 25, 2023
5 checks passed
@jim jim deleted the replace-webpacker branch September 25, 2023 13:49
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

Successfully merging this pull request may close these issues.

1 participant