-
Notifications
You must be signed in to change notification settings - Fork 99
Upgrade to webpack 5 #1896
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
Upgrade to webpack 5 #1896
Conversation
Hi @Sibirius 👋 |
@marcolink |
@Sibirius this looks great 🎉 Do you know why it"s now also creating the LICENCE files in the |
@marcolink |
If you would be able to integrate |
@marcolink |
@marcolink |
@Sibirius |
@Sibirius
results in
but it should have root-level exports for RestAdapter, createClient, etc, because otherwise, that would be a breaking change.
If this sounds reasonable (to remove |
Hey @mayakarabula 👋 Should I just close this one, since it's now continued in #1921 ? |
@Sibirius |
@mayakarabula |
thank you! I will merge it |
* chore: upgrade webpack to version 5 * fix: update webpack config for new version * chore: remove babel-minify-webpack-plugin * chore: remove license.txt files * remove library parameter --------- Co-authored-by: Marco Link <[email protected]> Co-authored-by: Maya Karabula-Stysiak <[email protected]>
🎉 This PR is included in version 10.40.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
This PR upgrades webpack and related packages to version 5.
Description
The config changes needed are actually quite minimal:
node.os: 'empty'
toresolve.fallback.os: false
as stated here https://webpack.js.org/migrate/5/#clean-up-configurationOccurrenceOrderPlugin
as it's on by default: https://webpack.js.org/migrate/3/#occurrenceorderplugin-is-now-on-by-defaultMotivation and Context
We are using the
contentful-management
library in a React app and recently upgraded our build system to use webpack 5. After this upgrade we were seeing runtime errors relating to enums from this library not being defined.We were able to narrow down the issue to the minimization step of webpack. With
minimize: false
everything is working fine. So I decided to give upgrading to webpack 5 in this repo a try and now it works for us.I was able to successfully run build and test locally. Please let me know if there's anything else needed from my side.
Checklist (check all before merging)