mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 15:02:11 +08:00
When using the `application` builder, the usage of a custom postcss configuration is now supported. The builder will automatically detect and use specific postcss configuration files if present in either the project root directory or the workspace root. Files present in the project root will have priority over a workspace root file. If using a custom postcss configuration file, the automatic tailwind integration will be disabled. To use both a custom postcss configuration and tailwind, the tailwind setup must be included in the custom postcss configuration file. The configuration files must be JSON and named one of the following: * `postcss.config.json` * `.postcssrc.json` A configuration file can use either an array form or an object form to setup plugins. An example of the array form: ``` { "plugins": [ "tailwindcss", ["rtlcss", { "useCalc": true }] ] } ``` The same in an object form: ``` { "plugins": { "tailwindcss": {}, "rtlcss": { "useCalc": true } } } ``` NOTE: Using a custom postcss configuration may result in reduced build and rebuild performance. Postcss will be used to process all global and component stylesheets when a custom configuration is present. Without a custom postcss configuration, postcss is only used for a stylesheet when tailwind is enabled and the stylesheet requires tailwind processing.