Skip to content

Commit 8c3dd06

Browse files
authored
feat!: update default browser target (#21193)
1 parent 8e6c78d commit 8c3dd06

14 files changed

Lines changed: 27 additions & 27 deletions

File tree

docs/config/build-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Unless noted, the options in this section are only applied to build.
88
- **Default:** `'baseline-widely-available'`
99
- **Related:** [Browser Compatibility](/guide/build#browser-compatibility)
1010

11-
Browser compatibility target for the final bundle. The default value is a Vite special value, `'baseline-widely-available'`, which targets browsers that are included in the [Baseline](https://web-platform-dx.github.io/web-features/) Widely Available on 2025-05-01. Specifically, it is `['chrome107', 'edge107', 'firefox104', 'safari16']`.
11+
Browser compatibility target for the final bundle. The default value is a Vite special value, `'baseline-widely-available'`, which targets browsers that are included in the [Baseline](https://web-platform-dx.github.io/web-features/) Widely Available on 2026-01-01. Specifically, it is `['chrome111', 'edge111', 'firefox114', 'safari16.4']`.
1212

1313
Another special value is `'esnext'` - which assumes native dynamic imports support and will only perform minimal transpiling.
1414

docs/guide/build.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ By default, the production bundle assumes a modern browser that is included in t
88

99
<!-- Search for the `ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET` constant for more information -->
1010

11-
- Chrome >=107
12-
- Edge >=107
13-
- Firefox >=104
14-
- Safari >=16
11+
- Chrome >=111
12+
- Edge >=111
13+
- Firefox >=114
14+
- Safari >=16.4
1515

1616
You can specify custom targets via the [`build.target` config option](/config/build-options.md#build-target), where the lowest target is `es2015`. If a lower target is set, Vite will still require these minimum browser support ranges as it relies on [native ESM dynamic import](https://caniuse.com/es6-module-dynamic-import), and [`import.meta`](https://caniuse.com/mdn-javascript_operators_import_meta):
1717

docs/guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can learn more about the rationale behind the project in the [Why Vite](./wh
2020

2121
## Browser Support
2222

23-
During development, Vite assumes that a modern browser is used. This means the browser supports most of the latest JavaScript and CSS features. For that reason, Vite sets [`esnext` as the transform target](https://esbuild.github.io/api/#target). This prevents syntax lowering, letting Vite serve modules as close as possible to the original source code. Vite injects some runtime code to make the development server work. These code use features included in [Baseline](https://web-platform-dx.github.io/web-features/) Newly Available at the time of each major release (2025-05-01 for this major).
23+
During development, Vite assumes that a modern browser is used. This means the browser supports most of the latest JavaScript and CSS features. For that reason, Vite sets [`esnext` as the transform target](https://esbuild.github.io/api/#target). This prevents syntax lowering, letting Vite serve modules as close as possible to the original source code. Vite injects some runtime code to make the development server work. These code use features included in [Baseline](https://web-platform-dx.github.io/web-features/) Newly Available at the time of each major release (2026-01-01 for this major).
2424

2525
For production builds, Vite by default targets [Baseline](https://web-platform-dx.github.io/web-features/) Widely Available browsers. These are browsers that were released at least 2.5 years ago. The target can be lowered via configuration. Additionally, legacy browsers can be supported via the official [@vitejs/plugin-legacy](https://github.com/vitejs/vite/tree/main/packages/plugin-legacy). See the [Building for Production](./build) section for more details.
2626

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default defineConfig(
4848
: undefined,
4949
},
5050
globals: {
51-
...globals.es2021,
51+
...globals.es2023,
5252
...globals.node,
5353
},
5454
},

packages/create-vite/template-lit-ts/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2022",
3+
"target": "ES2023",
44
"experimentalDecorators": true,
55
"useDefineForClassFields": false,
66
"module": "ESNext",
7-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
88
"types": ["vite/client"],
99
"skipLibCheck": true,
1010

packages/create-vite/template-preact-ts/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4-
"target": "ES2022",
4+
"target": "ES2023",
55
"useDefineForClassFields": true,
66
"module": "ESNext",
7-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
88
"types": ["vite/client"],
99
"skipLibCheck": true,
1010
"paths": {

packages/create-vite/template-qwik-ts/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4-
"target": "ES2022",
4+
"target": "ES2023",
55
"useDefineForClassFields": true,
66
"module": "ESNext",
7-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
88
"types": ["vite/client"],
99
"skipLibCheck": true,
1010

packages/create-vite/template-react-ts/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"compilerOptions": {
33
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4-
"target": "ES2022",
4+
"target": "ES2023",
55
"useDefineForClassFields": true,
6-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
6+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
77
"module": "ESNext",
88
"types": ["vite/client"],
99
"skipLibCheck": true,

packages/create-vite/template-solid-ts/tsconfig.app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4-
"target": "ES2022",
4+
"target": "ES2023",
55
"useDefineForClassFields": true,
66
"module": "ESNext",
7-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
7+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
88
"types": ["vite/client"],
99
"skipLibCheck": true,
1010

packages/create-vite/template-svelte-ts/tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "@tsconfig/svelte/tsconfig.json",
33
"compilerOptions": {
44
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5-
"target": "ES2022",
5+
"target": "ES2023",
66
"useDefineForClassFields": true,
77
"module": "ESNext",
88
"types": ["svelte", "vite/client"],

0 commit comments

Comments
 (0)