Browse Source

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

xiaoxian521 1 năm trước cách đây
mục cha
commit
743691ba5d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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,