|
@@ -24,10 +24,20 @@ export default defineConfig({
|
|
|
// vite 反向代理
|
|
|
proxy: {
|
|
|
"/api": {
|
|
|
- target: "http://192.168.1.112:19802",
|
|
|
+ target: "http://192.168.1.112:19801",
|
|
|
changeOrigin: false,
|
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ build: {
|
|
|
+ // 静态资源打包到dist下的不同目录
|
|
|
+ rollupOptions: {
|
|
|
+ output: {
|
|
|
+ chunkFileNames: 'static/js/[name]-[hash].js',
|
|
|
+ entryFileNames: 'static/js/[name]-[hash].js',
|
|
|
+ assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|