|
@@ -10,7 +10,7 @@ import AutoImport from 'unplugin-auto-import/vite'
|
|
|
import WindiCSS from 'vite-plugin-windicss'
|
|
|
import VueMacros from 'unplugin-vue-macros/vite'
|
|
|
import { VantResolver } from 'unplugin-vue-components/resolvers'
|
|
|
-
|
|
|
+import legacyPlugin from '@vitejs/plugin-legacy'
|
|
|
export default defineConfig({
|
|
|
base: '',
|
|
|
resolve: {
|
|
@@ -22,6 +22,11 @@ export default defineConfig({
|
|
|
hmr: { overlay: false }, // 禁用或配置 HMR 连接 设置 server.hmr.overlay 为 false 可以禁用服务器错误遮罩层
|
|
|
},
|
|
|
plugins: [
|
|
|
+ legacyPlugin({
|
|
|
+ targets: ['chrome 52'], // 需要兼容的目标列表,可以设置多个
|
|
|
+ additionalLegacyPolyfills: ['regenerator-runtime/runtime'] // 面向IE11时需要此插件
|
|
|
+ }),
|
|
|
+
|
|
|
VueMacros({
|
|
|
defineOptions: false,
|
|
|
defineModels: false,
|