From 60d27380f7458ec84aa4627568a54910e62db5b5 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 29 Jun 2023 05:26:04 +0200 Subject: [PATCH 1/2] fix modularizeImports with @mui/material (#51953) Fixes #51872. We were exploring in https://github.com/mui/material-ui/pull/35457 the option to move the `modularizeImports` config to our Next.js examples to fix https://github.com/mui/material-ui/issues/35450 however, we never got to complete the work. We are not yet in a position where we can apply modularizeImports to `@mui/material`. We still have folders to create to make it work. Maybe we should close https://github.com/mui/material-ui/pull/35457? Co-authored-by: JJ Kasper --- packages/next/src/server/config.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index 6719f8619766..f9a1e683ed80 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -693,9 +693,6 @@ function assignDefaults( '@mui/icons-material': { transform: '@mui/icons-material/{{member}}', }, - '@mui/material': { - transform: '@mui/material/{{member}}', - }, 'date-fns': { transform: 'date-fns/{{member}}', }, From 3dcaf922de907bac1598939e95a034555e57e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 29 Jun 2023 05:48:29 +0200 Subject: [PATCH 2/2] docs: clarify `reactStrictMode: true` by default (#51931) Closes #51841 [Slack thread](https://vercel.slack.com/archives/C03S9JCH2Q5/p1687815414309519?thread_ts=1687814821.415089&cid=C03S9JCH2Q5) Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com> --- .../02-api-reference/05-next-config-js/reactStrictMode.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/02-app/02-api-reference/05-next-config-js/reactStrictMode.mdx b/docs/02-app/02-api-reference/05-next-config-js/reactStrictMode.mdx index ed92705cd3b9..d4478784da64 100644 --- a/docs/02-app/02-api-reference/05-next-config-js/reactStrictMode.mdx +++ b/docs/02-app/02-api-reference/05-next-config-js/reactStrictMode.mdx @@ -5,6 +5,8 @@ description: The complete Next.js runtime is now Strict Mode-compliant, learn ho {/* The content of this doc is shared between the app and pages router. You can use the `Content` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */} +> **Good to know**: Since Next.js 13.4, Strict Mode is `true` by default with `app` router, so the above configuration is only necessary for `pages`. You can still disable Strict Mode by setting `reactStrictMode: false`. + > **Suggested**: We strongly suggest you enable Strict Mode in your Next.js application to better prepare your application for the future of React. React's [Strict Mode](https://react.dev/reference/react/StrictMode) is a development mode only feature for highlighting potential problems in an application. It helps to identify unsafe lifecycles, legacy API usage, and a number of other features.