Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down