From 697f69d5d78d27f3489fa590750d893c1562289c Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 6 Oct 2025 21:49:12 +0800 Subject: [PATCH] use a fixed browser version as the build target --- tsconfig.json | 4 ++-- vite.config.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index ff1b4cad..abde7a9d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "extends": "@vue/tsconfig/tsconfig.dom.json", "compilerOptions": { - "target": "ES2015", - "lib": ["DOM", "ES2015"], + "target": "ES2022", + "lib": ["DOM", "ES2022"], "types": ["vite/client"], "strict": true, "noImplicitReturns": true, diff --git a/vite.config.ts b/vite.config.ts index 9065f953..96eb3c81 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -195,6 +195,12 @@ export default defineConfig(() => { }) ], build: { + target: [ + 'chrome91', + 'edge91', + 'firefox91', + 'safari15.4' + ], outDir: BUILD_DIR, sourcemap: false, assetsInlineLimit: 0,