From bf17af552ff0e588564b649b76c19959342e4a13 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Fri, 6 Jan 2023 09:24:40 -0500 Subject: [PATCH] docs(misc): remove webpack 5 migration guide (#14185) --- docs/generated/manifests/menus.json | 16 ---------- docs/generated/manifests/recipes.json | 20 ------------ docs/map.json | 5 --- docs/shared/guides/webpack-5.md | 43 -------------------------- nx-dev/nx-dev/redirect-rules.config.js | 1 - 5 files changed, 85 deletions(-) delete mode 100644 docs/shared/guides/webpack-5.md diff --git a/docs/generated/manifests/menus.json b/docs/generated/manifests/menus.json index 3aa9f164a041d..c506b0d9e039c 100644 --- a/docs/generated/manifests/menus.json +++ b/docs/generated/manifests/menus.json @@ -2533,14 +2533,6 @@ "children": [], "disableCollapsible": false }, - { - "name": "Webpack 5 Migration", - "path": "/recipes/other/webpack-5", - "id": "webpack-5", - "isExternal": false, - "children": [], - "disableCollapsible": false - }, { "name": "Using Tailwind CSS in React", "path": "/recipes/other/using-tailwind-css-in-react", @@ -2792,14 +2784,6 @@ "children": [], "disableCollapsible": false }, - { - "name": "Webpack 5 Migration", - "path": "/recipes/other/webpack-5", - "id": "webpack-5", - "isExternal": false, - "children": [], - "disableCollapsible": false - }, { "name": "Using Tailwind CSS in React", "path": "/recipes/other/using-tailwind-css-in-react", diff --git a/docs/generated/manifests/recipes.json b/docs/generated/manifests/recipes.json index 5e2de53eced15..145968fa2e37b 100644 --- a/docs/generated/manifests/recipes.json +++ b/docs/generated/manifests/recipes.json @@ -1095,16 +1095,6 @@ "path": "/recipes/other/deploy-nextjs-to-vercel", "tags": [] }, - { - "id": "webpack-5", - "name": "Webpack 5 Migration", - "description": "", - "file": "shared/guides/webpack-5", - "itemList": [], - "isExternal": false, - "path": "/recipes/other/webpack-5", - "tags": [] - }, { "id": "using-tailwind-css-in-react", "name": "Using Tailwind CSS in React", @@ -1420,16 +1410,6 @@ "path": "/recipes/other/deploy-nextjs-to-vercel", "tags": [] }, - "/recipes/other/webpack-5": { - "id": "webpack-5", - "name": "Webpack 5 Migration", - "description": "", - "file": "shared/guides/webpack-5", - "itemList": [], - "isExternal": false, - "path": "/recipes/other/webpack-5", - "tags": [] - }, "/recipes/other/using-tailwind-css-in-react": { "id": "using-tailwind-css-in-react", "name": "Using Tailwind CSS in React", diff --git a/docs/map.json b/docs/map.json index 543e6334c344c..aacdae4dafc96 100644 --- a/docs/map.json +++ b/docs/map.json @@ -1060,11 +1060,6 @@ "id": "deploy-nextjs-to-vercel", "file": "shared/guides/deploy-nextjs-to-vercel" }, - { - "name": "Webpack 5 Migration", - "id": "webpack-5", - "file": "shared/guides/webpack-5" - }, { "name": "Using Tailwind CSS in React", "id": "using-tailwind-css-in-react", diff --git a/docs/shared/guides/webpack-5.md b/docs/shared/guides/webpack-5.md deleted file mode 100644 index bb0bc01e9f54f..0000000000000 --- a/docs/shared/guides/webpack-5.md +++ /dev/null @@ -1,43 +0,0 @@ -# Webpack 5 Migration - -{% callout type="note" title="Customizing webpack" %} -This page is for Nx 13 migration to Webpack 5, and is no longer applicable in Nx 14+. For customizing Webpack, see [our recipe on this topic](/recipes/other/customize-webpack). -{% /callout %} - -Starting in Nx 13, we only support Webpack 5, which is automatically enabled for all workspaces. - -Workspaces with custom webpack configuration should make sure that all their plugins and loaders are compatible with Webpack 5. -For additional help on the migration, check out Webpack's ["To v5 from v4" guide](https://webpack.js.org/migrate/5/). - -Nx 12 is the last Nx version to support Webpack 4. We highly suggest you upgrade as soon as possible to benefit from future patches and features. - -## Webpack 5 for React Apps - -Webpack 5 comes with Nx 13, and your apps should work as long as you use compatible webpack plugins (or don't have customized webpack configuration). - -If you have any failing plugins, try upgrading to the latest versions. For more information refer to Webpack's ["To v5 from v4" guide](https://webpack.js.org/migrate/5/). - -## Webpack 5 for Next.js Apps - -As of Next.js 11 and Nx 12.6.0, Webpack 5 is the default version used. Check your `next.config.js` file to ensure it is -enabled. - -```javascript {% fileName="next.config.js" %} -// eslint-disable-next-line @typescript-eslint/no-var-requires -const withNx = require('@nrwl/next/plugins/with-nx'); - -const nextConfig = { - webpack5: true, -}; - -module.exports = withNx(nextConfig); -``` - -For more information about webpack 5 adoption in Next.js, refer to -their [webpack 5 guide](https://nextjs.org/docs/messages/webpack5). - -## Webpack 5 for Angular Apps - -As of Angular 12, the tooling of Angular uses webpack 5 and support for webpack 4 has been removed. - -For more information, refer to their [update guide](https://angular.io/guide/updating-to-version-12). diff --git a/nx-dev/nx-dev/redirect-rules.config.js b/nx-dev/nx-dev/redirect-rules.config.js index 11ab0fcc7fe56..0ccc2025cab5f 100644 --- a/nx-dev/nx-dev/redirect-rules.config.js +++ b/nx-dev/nx-dev/redirect-rules.config.js @@ -248,7 +248,6 @@ const diataxis = { '/guides/browser-support': '/recipes/other/browser-support', '/guides/react-native': '/recipes/other/react-native', '/guides/deploy-nextjs-to-vercel': '/recipes/other/deploy-nextjs-to-vercel', - '/guides/webpack-5': '/recipes/other/webpack-5', '/guides/using-tailwind-css-in-react': '/recipes/other/using-tailwind-css-in-react', '/guides/react-18': '/recipes/other/react-18',