Skip to content

Commit c713741

Browse files
authored
Explain Ignored PostCSS Plugin (vercel#10240)
1 parent a356d2f commit c713741

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

errors/postcss-ignored-plugin.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ignored PostCSS Plugin
2+
3+
#### Why This Error Occurred
4+
5+
The project's custom PostCSS configuration attempts to configure unnecessary plugins:
6+
7+
- postcss-modules-values
8+
- postcss-modules-scope
9+
- postcss-modules-extract-imports
10+
- postcss-modules-local-by-default
11+
- postcss-modules
12+
13+
#### Possible Ways to Fix It
14+
15+
Remove the plugin specified in the error message from your custom PostCSS configuration.
16+
17+
#### How do I configure CSS Modules?
18+
19+
CSS Modules are supported in [Next.js' built-in CSS support](https://nextjs.org/docs/advanced-features/customizing-postcss-config).
20+
You can [read more](https://nextjs.org/docs/advanced-features/customizing-postcss-config) about how to use them [here](https://nextjs.org/docs/advanced-features/customizing-postcss-config).

packages/next/build/webpack/config/blocks/css/plugins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ function isIgnoredPlugin(pluginPath: string): boolean {
3737
`${chalk.yellow.bold('Warning')}: Please remove the ${chalk.underline(
3838
plugin
3939
)} plugin from your PostCSS configuration. ` +
40-
`This plugin is automatically configured by Next.js.`
40+
`This plugin is automatically configured by Next.js.\n` +
41+
'Read more: https://err.sh/next.js/postcss-ignored-plugin'
4142
)
4243
return true
4344
}

0 commit comments

Comments
 (0)