19 lines
No EOL
391 B
TypeScript
19 lines
No EOL
391 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({mode}) => {
|
|
const env = loadEnv(mode, './')
|
|
return {
|
|
plugins: [vue()],
|
|
server: {
|
|
port: +env.VITE_PORT,
|
|
proxy: {
|
|
'/api': {
|
|
target: env.VITE_BACKEND,
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}) |