-
Notifications
You must be signed in to change notification settings - Fork 101
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 bundler instead of webpack #359
Comments
just FYI, I have been using esbuild for a couple of months on both production and dev build on a very large scala.js project at work. The plugin is fairly simple, I still need scalajs bundler to pull npm dependencies but not webpack. |
Interesting! Do we need to provide some sort of integration (ie, we would replace the bundling part currently done by webpack with something that uses esbuild)? Or should we remove the concern of bundling from sbt-scalajs-bundler and focus only on fetching NPM dependencies? |
There are tasks that |
It maybe interesting to explore this approach. |
Given that module splitting support has landed in 1.3, I don't think we need the |
I wonder the impact of tests. Could we be able to write tests in sbt if there is no bundler integration. |
esbuild is used by Snowpack too |
Also consider https://vitejs.dev/, which uses esbuild, as alternative to Webpack. |
@ngbinh I agree with @mkotsbak why not consider adopting vite instead of just esbuild? vite would give a double benefit of bringing the speed of esbuild but also enabling code-splitting (not yet supported in esbuild as I understand...), which is another hot feature: So maybe we get 2 birds with 1 stone adopting vite alternative to webpack? |
Vitejs is great. But if you only need a bundler then using esbuild directly is simpler |
I don't understand this comment. libraryOnly mode is still useful IMO as it allows clients to cache your library's bundles which will change much less frequently than your application code. Or do I misunderstand your point? |
I switched to use esbuild, an extremely fast JS bundler, instead of
webpack
recently on our big scala.js repo at work. The result is quite impressive, there are projects thatesbuild
can bundle in seconds wherewebpack
would just OOM.I still need to rely on
scalajs-bundler
to pull in npm dependencies. While I can just usescalajs-bundler
without webpack by not callingfastOptJS
/fullOptJS
, I believe it may be beneficial for scala.js ecosystem as a whole to have an official backend onesbuild
inscalajs-bundler
.I can try to give this a shot if you guys think it is the right thing for
scalajs-bundler
The text was updated successfully, but these errors were encountered: