This commit is contained in:
parent
c6e12c1fdb
commit
2e3d3163ef
|
|
@ -5,7 +5,7 @@ import {fileURLToPath} from 'url'
|
||||||
|
|
||||||
export default defineConfig(({mode, command}) => {
|
export default defineConfig(({mode, command}) => {
|
||||||
const env = loadEnv(mode, process.cwd())
|
const env = loadEnv(mode, process.cwd())
|
||||||
const {VITE_API_BASE} = env
|
const {VITE_API_BASE, VITE_APP_ENV} = env
|
||||||
return {
|
return {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|
@ -18,7 +18,7 @@ export default defineConfig(({mode, command}) => {
|
||||||
},
|
},
|
||||||
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
|
||||||
},
|
},
|
||||||
base: '/',
|
base: VITE_APP_ENV == 'production' ? '/super' : '/',
|
||||||
// vite 相关配置
|
// vite 相关配置
|
||||||
server: {
|
server: {
|
||||||
port: 8611,
|
port: 8611,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue