38 lines
749 B
TypeScript
38 lines
749 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3010,
|
|
host: true,
|
|
proxy: {
|
|
'/calendar-api': {
|
|
target: 'http://127.0.0.1:8098',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (!id.includes('node_modules')) {
|
|
return undefined
|
|
}
|
|
if (id.includes('element-plus') || id.includes('@element-plus')) {
|
|
return 'element-plus'
|
|
}
|
|
return 'vendor'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|