Skip to content

Commit eb448d3

Browse files
sync: Update Vite docs from upstream 20250517
1 parent 23255a0 commit eb448d3

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

docs/config/shared-options.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ Note if an inline config is provided, Vite will not search for other PostCSS con
227227
Specify options to pass to CSS pre-processors. The file extensions are used as keys for the options. The supported options for each preprocessor can be found in their respective documentation:
228228

229229
- `sass`/`scss`:
230-
- 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.
231-
- [Options (modern)](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/)
232-
- [Options (legacy)](https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions).
230+
- Select the sass API to use with `api: "modern-compiler" | "modern"` (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.
231+
- [Options](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/)
233232
- `less`: [Options](https://lesscss.org/usage/#less-options).
234233
- `styl`/`stylus`: Only [`define`](https://stylus-lang.com/docs/js.html#define-name-node) is supported, which can be passed as an object.
235234

@@ -248,7 +247,7 @@ export default defineConfig({
248247
},
249248
},
250249
scss: {
251-
api: 'modern-compiler', // or "modern", "legacy"
250+
api: 'modern-compiler', // or "modern"
252251
importers: [
253252
// ...
254253
],

docs/guide/api-environment-frameworks.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ export default {
329329
}
330330
```
331331
332+
Plugins can also define a `buildApp` hook. Order `'pre'` and `null'` are executed before the configured `builder.buildApp`, and order `'post'` hooks are executed after it. `environment.isBuilt` can be used to check if an environment has already being build.
333+
332334
## Environment Agnostic Code
333335
334336
Most of the time, the current `environment` instance will be available as part of the context of the code being run so the need to access them through `server.environments` should be rare. For example, inside plugin hooks the environment is exposed as part of the `PluginContext`, so it can be accessed using `this.environment`. See [Environment API for Plugins](./api-environment-plugins.md) to learn about how to build environment aware plugins.

docs/guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The supported template presets are:
4444
## Scaffolding Your First Vite Project
4545

4646
::: tip Compatibility Note
47-
Vite requires [Node.js](https://nodejs.org/en/) version 18+ or 20+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
47+
Vite requires [Node.js](https://nodejs.org/en/) version 20+. However, some templates require a higher Node.js version to work, please upgrade if your package manager warns about it.
4848
:::
4949

5050
::: code-group

0 commit comments

Comments
 (0)