├── .github └── FUNDING.yml ├── LICENSE ├── MIGRATION GUIDE.md ├── README.md └── guides ├── module-federation.md └── persistent-caching.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: sokra 4 | open_collective: webpack 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 webpack 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MIGRATION GUIDE.md: -------------------------------------------------------------------------------- 1 | [Help by editing this file](https://github.com/webpack/changelog-v5/edit/master/MIGRATION%20GUIDE.md). 2 | 3 | This guide should help you migrating to webpack 5 when **using webpack directly**. If you are using some higher-level tool to run webpack, please refer to the guide on migrating to webpack 5 for the tool you are using. 4 | 5 | # Preparations 6 | 7 | ## Upgrade your Node.js version 8 | 9 | webpack requires at least 10.13.0, but using Node.js 12 or 14 is recommended. 10 | 11 | Newer Node.js version will improve build performance a lot. 12 | 13 | ## Upgrade to latest webpack 4 version 14 | 15 | When using webpack < 4 consult the webpack 4 migration guide. 16 | 17 | When using webpack >= 4, this should be possible without problems. 18 | 19 | ## Upgrade to latest webpack-cli version (when used) 20 | 21 | ## Upgrade all plugins and loaders to the latest version 22 | 23 | Some plugins have a beta version that needs to be used for webpack 5 compatibility. Use them. 24 | 25 | Check migration guide when upgrading plugins across the major version. 26 | 27 | ## Make sure your build has no errors or warnings 28 | 29 | There might be new errors or warnings because of the upgraded versions of webpack, cli, plugins and loaders. 30 | 31 | ## Check for deprecation warnings during build 32 | 33 | You can invoke webpack this way 34 | 35 | ``` sh 36 | node --trace-deprecation node_modules/webpack/bin/webpack.js ... 37 | ``` 38 | 39 | to get stack traces for deprecation warnings to figure out which plugins are responsible. 40 | 41 | webpack 5 removes all deprecated features. You must have no webpack deprecation warning to be able to upgrade. 42 | 43 | ## Make sure you are using entrypoint information from stats 44 | 45 | When using html-webpack-plugin you are fine. 46 | 47 | When using static html or creating HTML in some other way, make sure you use `entrypoints` from stats json to generate `