Browse Source

chore: 打包后的代码改为默认原生支持 `ES2015` 的浏览器

xiaoxian521 1 year ago
parent
commit
743691ba5d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      vite.config.ts

+ 2 - 0
vite.config.ts

@@ -52,6 +52,8 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
       exclude
     },
     build: {
+      // https://cn.vitejs.dev/guide/build.html#browser-compatibility
+      target: "es2015",
       sourcemap: false,
       // 消除打包大小超过500kb警告
       chunkSizeWarningLimit: 4000,