|
|
@@ -5,33 +5,7 @@ import vue from '@vitejs/plugin-vue'
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
export default defineConfig({
|
|
|
- server: {
|
|
|
- port: 5173,
|
|
|
- host: '0.0.0.0',
|
|
|
- base: './',
|
|
|
- cors: true,
|
|
|
- open: true,
|
|
|
- proxy: {
|
|
|
- '/api': {
|
|
|
- target: "http://127.0.0.1:8000",
|
|
|
- changeOrigin: true,
|
|
|
- rewrite: (path) => path.replace(/^\/api/, "api"),
|
|
|
- },
|
|
|
- //解决npm run build报错
|
|
|
- build: {
|
|
|
- chunkSizeWarningLimit: 1500,
|
|
|
- rollupOptions: {
|
|
|
- output: {
|
|
|
- manualChunks(id) {
|
|
|
- if (id.includes('node_modules')) {
|
|
|
- return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+
|
|
|
plugins: [
|
|
|
vue(),
|
|
|
],
|