Update Webpack to next major version (webpack 5)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
We eventually want to update to webpack 5
Loaders and other webpack related dependencies
Below (a currently non-exhaustive list) of all loaders and their status quo,
| Compatible | Name | Current Version | Minimum version needed for webpack 5 | caveats |
|---|---|---|---|---|
| compression-webpack-plugin | 5.0.2 | 3.1.0 | - | |
| !60061 (merged) | copy-webpack-plugin | 5.1.2 | 6.0.4 | - |
Config changes
- We should double-check the
publicPathconfig. We currently set it in JS land based onGon. It seems like there is anautooption in webpack 5: https://webpack.js.org/configuration/output/#outputpublicpath / https://webpack.js.org/guides/public-path/#automatic-publicpath. We would need to check whether this works with all loaders. It would enable us to potentially remove: https://gitlab.com/gitlab-org/gitlab/-/blob/034d36ae/app/assets/javascripts/webpack.js
Edited by 🤖 GitLab Bot 🤖