From ee9ccc84cc4062e259d4037a2796dba9669a80a6 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Tue, 28 Jan 2020 11:02:00 -0500 Subject: [PATCH] Updated PostCSS docs and added a link to it (#10292) * Updated PostCSS docs and added a link to it * Added note back * Update customizing-postcss-config.md Co-authored-by: Joe Haddad --- docs/advanced-features/customizing-postcss-config.md | 8 ++++---- docs/basic-features/built-in-css-support.md | 11 +++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/docs/advanced-features/customizing-postcss-config.md b/docs/advanced-features/customizing-postcss-config.md index de5597836deda2e..0b1cb7bbb2780ee 100644 --- a/docs/advanced-features/customizing-postcss-config.md +++ b/docs/advanced-features/customizing-postcss-config.md @@ -54,8 +54,8 @@ You can learn more about [Next.js' CSS Module support here](/docs/basic-features ## Customizing Plugins -> **Warning**: When you define a custom PostCSS configuration file, Next.js **completely disables** the defaults listed above. -> Be sure to manually configure all features you need compiled, including [Autoprefixer](https://github.com/postcss/autoprefixer). +> **Warning**: When you define a custom PostCSS configuration file, Next.js **completely disables** the [default behavior](#default-behavior). +> Be sure to manually configure all the features you need compiled, including [Autoprefixer](https://github.com/postcss/autoprefixer). To customize the PostCSS configuration, create a `postcss.config.json` file in the root of your project. @@ -110,10 +110,10 @@ module.exports = { } ``` -Do **not use `require()`** to import the PostCSS Plugins. Plugins must be provided as strings. - > **Note**: Next.js also allows the file to be named `.postcssrc.js`. +Do **not use `require()`** to import the PostCSS Plugins. Plugins must be provided as strings. + > **Note**: If your `postcss.config.js` needs to support other non-Next.js tools in the same project, you must use the interoperable object-based format instead: > > ```js diff --git a/docs/basic-features/built-in-css-support.md b/docs/basic-features/built-in-css-support.md index 1fa7c5f48f36056..e1848b6ca838480 100644 --- a/docs/basic-features/built-in-css-support.md +++ b/docs/basic-features/built-in-css-support.md @@ -165,3 +165,14 @@ To support importing `.scss`, `.sass`, `.less`, or `.styl` files you can use - [@zeit/next-sass](https://github.com/zeit/next-plugins/tree/master/packages/next-sass) - [@zeit/next-less](https://github.com/zeit/next-plugins/tree/master/packages/next-less) - [@zeit/next-stylus](https://github.com/zeit/next-plugins/tree/master/packages/next-stylus) + +## Related + +For more information on what to do next, we recommend the following sections: + +