Skip to content

Commit fd55c60

Browse files
authored
docs: add some migration guide for v6 (#18444)
1 parent b80daa7 commit fd55c60

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/guide/migration.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,25 @@ Some internal APIs have been removed due to changes in Vite's implementation. If
1010

1111
The experimental Vite Runtime API evolved into the Module Runner API, released in Vite 6 as part of the new experimental [Environment API](/guide/api-environment). Given that the feature was experimental the removal of the previous API introduced in Vite 5.1 isn't a breaking change, but users will need to update their use to the Module Runner equivalent as part of migrating to Vite 6.
1212

13+
## General Changes
14+
15+
### JSON stringify
16+
17+
In Vite 5, when [`json.stringify: true`](/config/shared-options#json-stringify) is set, [`json.namedExports`](/config/shared-options#json-namedexports) was disabled.
18+
19+
From Vite 6, even when `json.stringify: true` is set, `json.namedExports` is not disabled and the value is respected. If you wish to achieve the previous behavior, you can set `json.namedExports: false`.
20+
21+
Vite 6 also introduces a new default value for `json.stringify` which is `'auto'`, which will only stringify large JSON files. To disable this behavior, set `json.stringify: false`.
22+
23+
## Advanced
24+
25+
There are other breaking changes which only affect few users.
26+
27+
- [[#18209] refactor!: bump minimal terser version to 5.16.0](https://github.com/vitejs/vite/pull/18209)
28+
- Minimal supported terser version for [`build.minify: 'terser'`](/config/build-options#build-minify) was bumped to 5.16.0 from 5.4.0.
29+
- [[#18243] chore(deps)!: migrate `fast-glob` to `tinyglobby`](https://github.com/vitejs/vite/pull/18243)
30+
- Range braces (`{01..03}``['01', '02', '03']`) and incremental braces (`{2..8..2}``['2', '4', '6', '8']`) are no longer supported in globs.
31+
1332
## Migration from v4
1433

1534
Check the [Migration from v4 Guide](https://v5.vite.dev/guide/migration.html) in the Vite v5 docs first to see the needed changes to port your app to Vite 5, and then proceed with the changes on this page.

0 commit comments

Comments
 (0)