-
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
Webpack 5 Support #350
Comments
I have the intention to add version 5 support (Maybe we should delete support for versions 3 and older) but sure, we need to wait for a public release first. |
I'm taking a look at this, the format of the stats has changed, it may take a while to get right and it maybe hard to support both webpack 4 and webpack 5 |
Webpack 5 was released, we should try to get this moving. |
This is fine by me, but I would like to hear from other users of scalajs-bundler :) |
So long as 5 works, I'm happy to drop 4. I do have some customizations, but they are hopefully simple enough they won't be hard to port. |
yeah I say we track the latest with master, and drop support for others but keep a branch around in case. It's not like people are needing fixes that often with this since it's mainly glue code. The only exception seems to be that sjsbundler will need some changes for scala 1.3.0 to work. |
Following this ticket I created #390 (pretty such a PoC, still a draft). I would love to get feedbacks from you before finishing the remaining tasks. |
Thanks @vhiairrassary for your work on #390. Do you plan to release an RC with webpack 5 support @julienrf @sjrd @cquiroz ? I'm willing to test it out. |
would love to test out the latest RC which contains webpack 5 support. Any instructions on how to manually build scalajs-bundler? |
@evbo You can clone the repository, run |
I've given the v0.21.0-RC1 tag a go in our project. I've had to change webpack's config by adding |
Would it be worth updating the documentation? For the moment it only mentions web pack 4 support. |
so far for me fast optimization is working, but as @Jaystified mentioned there's some painless webpack config updates anyone using webpack needs to consider. However, one unusual issue is after fast optimization, the dev server appears to start but with some errors:
I'm also noticing UPDATE for the latest SBT version here's what I use (@bblfish): webpack / version := "5.64.2"
// this fixes above error I was getting, per github issue in webpack repo
webpackCliVersion := "4.9.1"
startWebpackDevServer / version := "4.5.0" |
We've also encountered issues which will be fixed in #408:
Since our warnings are due to the Performance Hints, we decided to use |
Hello. |
I think the community is moving off this plugin and towards using Vite: https://www.scala-js.org/doc/tutorial/scalajs-vite.html. |
Worked for me, using scalajs-bundler // webpack config
webpack / version := "5.88.2",
webpackCliVersion := "5.1.4",
startWebpackDevServer / version := "4.15.1", |
As expected, scalajs-bundler will throw
Unsupported webpack major version 5
when trying to use anywebpack
version with a major version higher than 4.The update seems to primarily focus on better caching for better performance, deterministic builds, smaller output sizes, and better WebAssembly support.
I'm unsure about what needs to be changed here, but I assume that the changes to compiler hooks could be important.
I don't really expect support to be added until after it comes out of beta and enough plugins get up to date, but progress can be tracked here.
Migration Guide: https://webpack.js.org/migrate/5/
The text was updated successfully, but these errors were encountered: