|
@@ -1,5 +1,3 @@
|
|
|
-import { URL, fileURLToPath } from 'node:url'
|
|
|
-
|
|
|
import { defineConfig } from 'vite'
|
|
|
import legacy from '@vitejs/plugin-legacy'
|
|
|
import vue2 from '@vitejs/plugin-vue2'
|
|
@@ -14,6 +12,7 @@ import { ElementUiResolver } from "unplugin-vue-components/resolvers";
|
|
|
import viteCompression from 'vite-plugin-compression'
|
|
|
import visualizer from 'rollup-plugin-visualizer'
|
|
|
import antdvFix from 'vite-plugin-antdv-fix';
|
|
|
+import * as path from "path";
|
|
|
|
|
|
export default defineConfig(({ command }) => {
|
|
|
return {
|
|
@@ -51,15 +50,15 @@ export default defineConfig(({ command }) => {
|
|
|
},
|
|
|
resolve: {
|
|
|
alias: {
|
|
|
- '@/': new URL('./src/', import.meta.url).pathname,
|
|
|
+ '@': path.resolve(__dirname, './src'),
|
|
|
},
|
|
|
},
|
|
|
plugins: [
|
|
|
vue2(),
|
|
|
- //legacy({
|
|
|
- // targets: ['ie >= 11'],
|
|
|
- // additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
|
|
|
- //}),
|
|
|
+ legacy({
|
|
|
+ targets: ['ie >= 11'],
|
|
|
+ additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
|
|
|
+ }),
|
|
|
AutoImport({
|
|
|
imports: [
|
|
|
'vue',
|