mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-12 02:42:49 +00:00
32 lines
717 B
TypeScript
32 lines
717 B
TypeScript
import { fileURLToPath, URL } from "node:url"
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: '/admin/',
|
|
server: {
|
|
host: '0.0.0.0'
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
resolvers: [ElementPlusResolver()]
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()]
|
|
})
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: '@',
|
|
replacement: fileURLToPath(new URL('./src', import.meta.url))
|
|
}
|
|
]
|
|
}
|
|
})
|