33 lines
642 B
TypeScript
33 lines
642 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import { resolve } from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:23994',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'element-plus': ['element-plus', '@element-plus/icons-vue'],
|
|
'vendor': ['vue', 'vue-router', 'pinia', 'axios']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
cacheDir: 'node_modules/.vite'
|
|
})
|