You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
629 B
27 lines
629 B
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig, loadEnv } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd())
|
|
return {
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: Number(env.VITE_APP_PORT || 5174),
|
|
open: false,
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_APP_PROXY_API || 'http://127.0.0.1:3100',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|