Skip to content

Commit

Permalink
Update messages slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Jun 30, 2020
1 parent ab4f681 commit 2ead1d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion errors/css-global.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Global CSS cannot be used in files other than your [Custom `<App>`](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

Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/webpack/config/blocks/css/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function getGlobalImportError(file: string | null) {
'Custom <App>'
)}. 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() {
Expand Down

0 comments on commit 2ead1d9

Please sign in to comment.