refactor(web): 优化部署打包方案
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user