36 lines
768 B
TypeScript
36 lines
768 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src')
|
|
}
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'system': [
|
|
'./src/pages/System/User/index.tsx',
|
|
'./src/pages/System/Role/index.tsx',
|
|
'./src/pages/System/Menu/index.tsx',
|
|
'./src/pages/System/Department/index.tsx',
|
|
'./src/pages/System/External/index.tsx'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
})
|