diff --git a/src/content/migrate/5.mdx b/src/content/migrate/5.mdx index c9490c76f70d..2828511690cd 100644 --- a/src/content/migrate/5.mdx +++ b/src/content/migrate/5.mdx @@ -11,6 +11,7 @@ contributors: - chenxsan - jamesgeorge007 - getsnoopy + - yevhen-logosha --- This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to run webpack, please refer to the tool for migration instructions. @@ -32,6 +33,7 @@ Webpack 5 requires at least Node.js 10.13.0 (LTS), so make sure you upgrade your 3. Upgrade all used Plugins and Loaders to the latest available version Some Plugins and Loaders might have a beta version that has to be used in order to be compatible with webpack 5. + Make sure to read release notes of each individual plugin/loader when upgrading it, since latest version might only support webpack 5 and will fail in v4. In such case, it's recommended to update to the latest version that supports webpack 4. ### Make sure your build has no errors or warnings @@ -92,6 +94,8 @@ Now let's upgrade webpack to version 5: - Yarn: `yarn add webpack@latest` +If you were not able to upgrade some plugins/loaders to the latest in Upgrade webpack 4 and its plugins/loaders step, don't forget to upgrade them now. + ### Clean up configuration - Consider removing `optimization.moduleIds` and `optimization.chunkIds` from your webpack configuration. The defaults could be better, because they support long term caching in [`production mode`](/configuration/mode/#mode-production) and debugging in [`development` mode](/configuration/mode/#mode-development).