docs: clarify preprocessor options extension (#7280)

This commit is contained in:
Bjorn Lu 2022-03-12 05:16:01 +08:00 committed by GitHub
parent 161f8eac89
commit c6c2fbbd9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -303,7 +303,7 @@ export default defineConfig(({ command, mode }) => {
- **Type:** `Record<string, object>`
Specify options to pass to CSS pre-processors. Example:
Specify options to pass to CSS pre-processors. The file extensions are used as keys for the options. Example:
```js
export default defineConfig({
@ -311,6 +311,9 @@ export default defineConfig(({ command, mode }) => {
preprocessorOptions: {
scss: {
additionalData: `$injectedColor: orange;`
},
styl: {
additionalData: `$injectedColor ?= orange`
}
}
}