Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove chalk in favor of picocolors
- Loading branch information
Showing
65 changed files
with
550 additions
and
438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 8 additions & 12 deletions
20
packages/next/src/build/webpack/config/blocks/css/messages.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,29 @@ | ||
import chalk from 'next/dist/compiled/chalk' | ||
import { bold, cyan } from 'next/dist/compiled/picocolors' | ||
|
||
export function getGlobalImportError() { | ||
return `Global CSS ${chalk.bold( | ||
return `Global CSS ${bold( | ||
'cannot' | ||
)} be imported from files other than your ${chalk.bold( | ||
)} be imported from files other than your ${bold( | ||
'Custom <App>' | ||
)}. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to ${chalk.cyan( | ||
)}. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to ${cyan( | ||
'pages/_app.js' | ||
)}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://nextjs.org/docs/messages/css-global` | ||
} | ||
|
||
export function getGlobalModuleImportError() { | ||
return `Global CSS ${chalk.bold( | ||
'cannot' | ||
)} be imported from within ${chalk.bold( | ||
return `Global CSS ${bold('cannot')} be imported from within ${bold( | ||
'node_modules' | ||
)}.\nRead more: https://nextjs.org/docs/messages/css-npm` | ||
} | ||
|
||
export function getLocalModuleImportError() { | ||
return `CSS Modules ${chalk.bold( | ||
'cannot' | ||
)} be imported from within ${chalk.bold( | ||
return `CSS Modules ${bold('cannot')} be imported from within ${bold( | ||
'node_modules' | ||
)}.\nRead more: https://nextjs.org/docs/messages/css-modules-npm` | ||
} | ||
|
||
export function getCustomDocumentError() { | ||
return `CSS ${chalk.bold('cannot')} be imported within ${chalk.cyan( | ||
return `CSS ${bold('cannot')} be imported within ${cyan( | ||
'pages/_document.js' | ||
)}. Please move global styles to ${chalk.cyan('pages/_app.js')}.` | ||
)}. Please move global styles to ${cyan('pages/_app.js')}.` | ||
} |
Oops, something went wrong.