-
Notifications
You must be signed in to change notification settings - Fork 29
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 compatibility #49
Conversation
I'm not sure what's up the with the node 8 tests for webpack 4 and 5 🤔 |
Hi @chadrien thanks so much for the contribution. Webpack 5 support is on our backlog, but it got beaten to the top by other high priority work, so this is a massive help in reducing the scope of the update. We can see why the tests are failing and it looks like it's not to do with your changes, but rather the version of We're happy to take it from here, fix the tests, put it through our QA process and get it landed. Thanks again 🙏 |
Thanks for the contribution @chadrien, this looks great. According to the migration guide "webpack 5 requires at least Node.js 10.13.0 (LTS)" and according to webpack/webpack-cli#1222 "with webpack-cli v4 we will support only webpack v5 and possibly v4 but not officially, so if there are any problems we suggest to use v3.* if you still want to keep the best compatibility" so I've adjusted the webpack/node version combinations accordingly for CI. @bengourley I've tested this by upgrading the dashboard project to use webpack 5 and this PR and all works well. Let me know if you'd like to see any further manual testing. |
Goal
The plugin is not working with Webpack 5
Design
The API for plugins changed a little, and it breaks the current implementation
Changeset
chunk.files
not longer holds maps, instead maps are listed inchunks.auxiliaryFiles
compiler.outputFileSystem
is getting reworked to be closer to the actual Node FS, meaningjoin
is deprecated / doomed to disappear as it's not standard. See: Removefs.join
webpack/memory-fs#67 Configurable file system via options.fs webpack/webpack-dev-middleware#370Testing