Browse Source

修改打包错误

master
xyiege 3 months ago
parent
commit
3bcffec1f6
  1. 3
      vue/afvue/package.json
  2. 10
      vue/afvue/vite.config.js

3
vue/afvue/package.json

@ -6,8 +6,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4173",
"proto": "pbjs -t json-module -w commonjs -o src/proto/scinfo.js src/proto/scinfo.proto"
"preview": "vite preview --port 4173"
},
"dependencies": {
"axios": "^1.11.0",

10
vue/afvue/vite.config.js

@ -1,17 +1,17 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import legacy from '@vitejs/plugin-legacy'
// import legacy from '@vitejs/plugin-legacy'
import vue2 from '@vitejs/plugin-vue2'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue2(),
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
})
// legacy({
// targets: ['ie >= 11'],
// additionalLegacyPolyfills: ['regenerator-runtime/runtime']
// })
],
resolve: {
alias: {

Loading…
Cancel
Save