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: {
|
|
|
|
|
drop_console: process.env.NODE_ENV === 'production',
|
|
|
|
|
drop_debugger: process.env.NODE_ENV === 'production',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
assetsInlineLimit: 4096,
|
|
|
|
|
cssCodeSplit: true,
|
|
|
|
|
},
|
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/, '')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|