|
|
@ -1,30 +1,42 @@ |
|
|
|
import { defineConfig } from 'vite' |
|
|
|
import vue from '@vitejs/plugin-vue' |
|
|
|
import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import' |
|
|
|
import legacy from '@vitejs/plugin-legacy'; |
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
export default defineConfig({ |
|
|
|
esbuild: { |
|
|
|
supported: { |
|
|
|
bigint: true |
|
|
|
} |
|
|
|
}, |
|
|
|
plugins: [vue(), |
|
|
|
lazyImport({ |
|
|
|
resolvers: [ |
|
|
|
VxeResolver({ |
|
|
|
libraryName: 'vxe-table' |
|
|
|
}), |
|
|
|
VxeResolver({ |
|
|
|
libraryName: 'vxe-pc-ui' |
|
|
|
}) |
|
|
|
] |
|
|
|
}) |
|
|
|
legacy({ |
|
|
|
targets: ['defaults', 'not IE 11', 'chrome >=73'], |
|
|
|
modernPolyfills: true |
|
|
|
}), |
|
|
|
lazyImport({ |
|
|
|
resolvers: [ |
|
|
|
VxeResolver({ |
|
|
|
libraryName: 'vxe-table' |
|
|
|
}), |
|
|
|
VxeResolver({ |
|
|
|
libraryName: 'vxe-pc-ui' |
|
|
|
}) |
|
|
|
] |
|
|
|
}) |
|
|
|
], |
|
|
|
server:{ |
|
|
|
server: { |
|
|
|
proxy: { |
|
|
|
'/hwjb': { |
|
|
|
// target: 'http://39.99.159.73:20090',
|
|
|
|
target: 'http://192.168.8.93:10010', |
|
|
|
// target: 'http://192.168.8.93:10010',
|
|
|
|
target: 'http://54.251.137.151:10702', |
|
|
|
changeOrigin: true, |
|
|
|
rewrite: (path) => path.replace(/^\/hwjb/, ''), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
base: process.env.NODE_ENV === "production" ? "/jtzy/Product/other/test/hwjb/" : "/", |
|
|
|
// base: process.env.NODE_ENV === "production" ? "/jtzy/Product/other/test/hwjb/" : "/",
|
|
|
|
base: process.env.NODE_ENV === "production" ? "./" : "/", |
|
|
|
}) |