diff --git a/README.md b/README.md index 47dbde901a8a02..1712e2c49f854a 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,24 @@ Or import them from JavaScript: import './style.scss' ``` +#### Passing Options to Pre-Processor + +> 0.20.3+ + +And if you want to pass options to the pre-processor, you can do that using the `cssPreprocessOptions` option in the config (see [Config File](#config-file) below). +For example, to pass some shared global variables to all your Less styles: + +```js +// vite.config.js +module.exports = { + cssPreprocessOptions: { + modifyVars: { + 'preprocess-custom-color': 'green' + } + } +} +``` + ### JSX `.jsx` and `.tsx` files are also supported. JSX transpilation is also handled via `esbuild`.