8221c180a5
This upgrades to ncc@0.25.0 and fixes the previous bugs including: * ncc not referenced correctly in build * Babel type errors * node-fetch, etag, chalk and raw-body dependencies not building with ncc - these have been "un-ncc'd" for now. As they are relatively small dependencies, this doesn't seem too much of an issue and we can follow up in the tracking ncc issue at https://github.com/vercel/ncc/issues/612. * `yarn dev` issues Took a lot of bisecting, but the overall diff isn't too bad here in the end.
33 lines
1 KiB
TypeScript
33 lines
1 KiB
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'
|
|
)}. Or convert the import to Component-Level CSS (CSS Modules).\nRead more: https://err.sh/next.js/css-global`
|
|
}
|
|
|
|
export function getGlobalModuleImportError() {
|
|
return `Global CSS ${chalk.bold(
|
|
'cannot'
|
|
)} be imported from within ${chalk.bold(
|
|
'node_modules'
|
|
)}.\nRead more: https://err.sh/next.js/css-npm`
|
|
}
|
|
|
|
export function getLocalModuleImportError() {
|
|
return `CSS Modules ${chalk.bold(
|
|
'cannot'
|
|
)} be imported from within ${chalk.bold(
|
|
'node_modules'
|
|
)}.\nRead more: https://err.sh/next.js/css-modules-npm`
|
|
}
|
|
|
|
export function getCustomDocumentError() {
|
|
return `CSS ${chalk.bold('cannot')} be imported within ${chalk.cyan(
|
|
'pages/_document.js'
|
|
)}. Please move global styles to ${chalk.cyan('pages/_app.js')}.`
|
|
}
|