From 4f1c3b6c89081fc5b658100243e19edceb933e75 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Tue, 12 Jul 2022 21:01:29 -0700 Subject: [PATCH 1/2] Update default target from `safari13` to `safari14`. From https://github.com/vitejs/vite/issues/9062, it sounds like the goal is to support ES2020 by default. However, the browser list was set to `safari13`, which means that big ints (an ES2020 feature) produced an error by default. This PR updates from `safari13` to `safari14` (released September 2020) to support that. Thanks for any consideration of this change! --- packages/vite/src/node/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/constants.ts b/packages/vite/src/node/constants.ts index 5a108652ef7ce6..ba7994a712528c 100644 --- a/packages/vite/src/node/constants.ts +++ b/packages/vite/src/node/constants.ts @@ -18,7 +18,7 @@ export const ESBUILD_MODULES_TARGET = [ 'edge88', 'firefox78', 'chrome87', - 'safari13' // transpile nullish coalescing + 'safari14' ] export const DEFAULT_EXTENSIONS = [ From 96f5c1905091a2ec0ef514f7f9bf26aaba8fb144 Mon Sep 17 00:00:00 2001 From: bluwy Date: Tue, 29 Nov 2022 01:38:25 +0800 Subject: [PATCH 2/2] docs: update browser compat --- docs/guide/build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index 41376b46e5f2f8..5b6ac8824c0aa4 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -8,7 +8,7 @@ The production bundle assumes support for modern JavaScript. By default, Vite ta - Chrome >=87 - Firefox >=78 -- Safari >=13 +- Safari >=14 - Edge >=88 You can specify custom targets via the [`build.target` config option](/config/build-options.md#build-target), where the lowest target is `es2015`.