Skip to content

Commit

Permalink
docs: improve preprocessorOptions list
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Oct 25, 2024
1 parent 27bd441 commit 5b17bd9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,12 @@ Note if an inline config is provided, Vite will not search for other PostCSS con

Specify options to pass to CSS pre-processors. The file extensions are used as keys for the options. The supported options for each preprocessors can be found in their respective documentation:

- `sass`/`scss` - top level option `api: "modern-compiler" | "modern" | "legacy"` (default `"modern-compiler"` if `sass-embedded`, otherwise `"modern"`) allows switching which sass API to use. For the best performance, it's recommended to use `api: "modern-compiler"` with `sass-embedded` package. `"legacy"` API is deprecated and will be removed in Vite 7. [Options (modern)](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/), [Options (legacy)](https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions).
- `less` - [Options](https://lesscss.org/usage/#less-options).
- `styl`/`stylus` - Only [`define`](https://stylus-lang.com/docs/js.html#define-name-node) is supported, which can be passed as an object.
- `sass`/`scss`:
- Select the sass API to use with `api: "modern-compiler" | "modern" | "legacy"` (default `"modern-compiler"` if `sass-embedded` is installed, otherwise `"modern"`). For the best performance, it's recommended to use `api: "modern-compiler"` with the `sass-embedded` package. The `"legacy"` API is deprecated and will be removed in Vite 7.
- [Options (modern)](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/)
- [Options (legacy)](https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions).
- `less`: [Options](https://lesscss.org/usage/#less-options).
- `styl`/`stylus`: Only [`define`](https://stylus-lang.com/docs/js.html#define-name-node) is supported, which can be passed as an object.

**Example:**

Expand Down

0 comments on commit 5b17bd9

Please sign in to comment.