2026-07-24 21:05:21 +08:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
import uni from '@dcloudio/vite-plugin-uni';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [uni()],
|
2026-07-24 22:06:19 +08:00
|
|
|
build: {
|
|
|
|
|
minify: 'terser',
|
|
|
|
|
terserOptions: {
|
|
|
|
|
compress: {
|
2026-09-14 13:44:30 +08:00
|
|
|
drop_console: true,
|
|
|
|
|
drop_debugger: true,
|
2026-07-24 22:06:19 +08:00
|
|
|
},
|
|
|
|
|
},
|
2026-09-14 13:44:30 +08:00
|
|
|
assetsInlineLimit: 2048,
|
2026-07-24 22:06:19 +08:00
|
|
|
cssCodeSplit: true,
|
2026-08-31 15:06:55 +08:00
|
|
|
chunkSizeWarningLimit: 2000,
|
2026-07-24 22:06:19 +08:00
|
|
|
},
|
2026-07-24 21:05:21 +08:00
|
|
|
server: {
|
|
|
|
|
port: 5173,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/proxy-api': {
|
|
|
|
|
target: 'https://api.o.tbmall.xin',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/proxy-api/, '')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|