|
@@ -2,19 +2,24 @@ import { defineConfig } from 'vite'
|
|
|
import { createVuePlugin } from 'vite-plugin-vue2'
|
|
|
import { resolve } from 'path'
|
|
|
import WindiCss from 'vite-plugin-windicss';
|
|
|
+import legacyPlugin from '@vitejs/plugin-legacy'
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
export default defineConfig(({ command }) => {
|
|
|
const config = {
|
|
|
plugins: [
|
|
|
+ legacyPlugin({
|
|
|
+ targets: ['chrome > 58'], // 需要兼容的目标列表,可以设置多个
|
|
|
+ additionalLegacyPolyfills: ['regenerator-runtime/runtime'] // 面向IE11时需要此插件
|
|
|
+ }),
|
|
|
createVuePlugin({
|
|
|
jsx: true,
|
|
|
}),
|
|
|
WindiCss()
|
|
|
],
|
|
|
- build: {
|
|
|
- target: 'chrome86'
|
|
|
- },
|
|
|
+ // build: {
|
|
|
+ // target: 'chrome86'
|
|
|
+ // },
|
|
|
resolve: {
|
|
|
alias: {
|
|
|
'~': resolve(__dirname, 'src'),
|