forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 2
/
messages.ts
27 lines (24 loc) · 787 Bytes
/
messages.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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/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`
}