refactor(web): 优化部署打包方案

This commit is contained in:
v-zhangjc9
2025-05-09 17:23:26 +08:00
parent 121f6688c6
commit aa93b52dd9
9 changed files with 378 additions and 115 deletions

View File

@@ -1,7 +1,13 @@
import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react-swc'
import {defineConfig, UserConfig} from 'vite'
// https://vite.dev/config/
export default defineConfig({
export default defineConfig(({mode}) => {
let config: UserConfig = {
plugins: [react()],
}
if (mode === 'production') {
config.base = '/hudi_services/service_web'
}
return config
})