feat: 添加vue3bbs前端
This commit is contained in:
37
Yi.BBS.Vue3/vite.config.js
Normal file
37
Yi.BBS.Vue3/vite.config.js
Normal file
@@ -0,0 +1,37 @@
|
||||
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'
|
||||
|
||||
/** @type {import('vite').UserConfig} */
|
||||
export default defineConfig({
|
||||
// envDir: 'env',
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
server:{
|
||||
port:18001,
|
||||
open:true,
|
||||
proxy:{
|
||||
'/api': {
|
||||
target: 'http://localhost:19001',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user