29 lines
634 B
TypeScript
29 lines
634 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { VantResolver } from '@vant/auto-import-resolver'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
Components({
|
|
resolvers: [VantResolver()],
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5174,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_PROXY_URL || 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|