chore(projects): use json5 resolve env VITE_OTHER_SERVICE_BASE_URL & fix proxy enable

This commit is contained in:
Soybean
2024-08-14 10:25:30 +08:00
parent 26c93dff9a
commit b16a96323a
5 changed files with 14 additions and 6 deletions

View File

@ -9,6 +9,8 @@ export default defineConfig(configEnv => {
const buildTime = getBuildTime();
const enableProxy = configEnv.command === 'serve' && !configEnv.isPreview;
return {
base: viteEnv.VITE_BASE_URL,
resolve: {
@ -32,7 +34,7 @@ export default defineConfig(configEnv => {
host: '0.0.0.0',
port: 9527,
open: true,
proxy: createViteProxy(viteEnv, configEnv.command === 'serve'),
proxy: createViteProxy(viteEnv, enableProxy),
fs: {
cachedChecks: false
}