2019-12-09 21:08:15 +01:00
|
|
|
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`
|
|
|
|
}
|
2019-12-11 11:46:12 +01:00
|
|
|
|
2019-12-27 19:35:37 +01:00
|
|
|
export function getGlobalModuleImportError() {
|
|
|
|
// TODO: Read more link
|
|
|
|
return `Global CSS ${chalk.bold(
|
|
|
|
'cannot'
|
|
|
|
)} be imported from within ${chalk.bold('node_modules')}.`
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getLocalModuleImportError() {
|
2019-12-11 11:46:12 +01:00
|
|
|
// TODO: Read more link
|
|
|
|
return `CSS Modules ${chalk.bold(
|
|
|
|
'cannot'
|
|
|
|
)} be imported from within ${chalk.bold('node_modules')}.`
|
|
|
|
}
|