From 2ead1d97baa796772927675665d56f517871b5d1 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Tue, 30 Jun 2020 01:09:04 -0400 Subject: [PATCH] Update messages slightly --- errors/css-global.md | 2 +- packages/next/build/webpack/config/blocks/css/messages.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/errors/css-global.md b/errors/css-global.md index 6a16c096cfeb7..51f70f45f6193 100644 --- a/errors/css-global.md +++ b/errors/css-global.md @@ -10,7 +10,7 @@ Global CSS cannot be used in files other than your [Custom ``](https://next Relocate all Global CSS imports to your [`pages/_app.js` file](https://nextjs.org/docs/advanced-features/custom-app). -Or consider using [CSS Modules](https://nextjs.org/blog/next-9-2#built-in-css-module-support-for-component-level-styles) instead. +Or, [update your component to use local CSS (Component-Level CSS) via CSS Modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css). This is the preferred approach. #### Example diff --git a/packages/next/build/webpack/config/blocks/css/messages.ts b/packages/next/build/webpack/config/blocks/css/messages.ts index facf9c6b7cda6..fbc2ec5026b5b 100644 --- a/packages/next/build/webpack/config/blocks/css/messages.ts +++ b/packages/next/build/webpack/config/blocks/css/messages.ts @@ -7,7 +7,7 @@ export function getGlobalImportError(file: string | null) { 'Custom ' )}. Please move all global CSS imports to ${chalk.cyan( file ? file : 'pages/_app.js' - )}. Or consider using CSS Modules instead.\nRead more: https://err.sh/next.js/css-global` + )}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://err.sh/next.js/css-global` } export function getGlobalModuleImportError() {