rsnext/packages/next/build/webpack/config/blocks/css/messages.ts
Joe Haddad 734989d836 [Experimental] CSS Module Support (#9686)
* CSS Module Support

* Fix Server-Side Render of CSS Modules

* Fix Jest Snapshots
https://github.com/facebook/jest/pull/8492

* Fix snapshots

* Add test for CSS module edit without remounting

* Add tests for dev and production style being applied

* Add missing TODOs

* Include/exclude should only be applied to issuer, not the CSS file itself

* Add CSS modules + node_modules tests

* Test that content is correct

* Create Multi Module Suite

* Add client-side navigation support for CSS

* Add tests for client-side nav

* Add some delays

* Try another fix

* Increase timeout to 3 minutes

* Fix test

* Give all unique directories
2019-12-11 11:46:12 +01:00

18 lines
539 B
TypeScript

import chalk from 'chalk'
export function getGlobalImportError(file: string | null) {
return `Global CSS ${chalk.bold(
'cannot'
)} be imported from files other than your ${chalk.bold(
'Custom <App>'
)}. Please move all global CSS imports to ${chalk.cyan(
file ? file : 'pages/_app.js'
)}.\nRead more: https://err.sh/next.js/global-css`
}
export function getModuleImportError() {
// TODO: Read more link
return `CSS Modules ${chalk.bold(
'cannot'
)} be imported from within ${chalk.bold('node_modules')}.`
}