35 lines
712 B
TypeScript
35 lines
712 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
Components({
|
|
dts: false,
|
|
resolvers: [ElementPlusResolver({ importStyle: 'css' })]
|
|
})
|
|
],
|
|
base: '/admin/',
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
vue: ['vue', 'vue-router'],
|
|
icons: ['@lucide/vue']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/admin-api': {
|
|
target: 'http://127.0.0.1:3001',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
}
|
|
});
|