| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import vueJsx from '@vitejs/plugin-vue-jsx'
- import vueDevTools from 'vite-plugin-vue-devtools'
- //import { viteMockServe } from 'vite-plugin-mock'
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [
- vue(),
- vueJsx(),
- vueDevTools(),
- // viteMockServe({
- // mockPath: 'mock',
- // logger: true // 打印 mock请求日志
- // })
- ],
- // resolve: {
- // alias: [
- // {
- // find: '@',
- // replacement: fileURLToPath(new URL('./src', import.meta.url))
- // },
- // {
- // find: '@element-plus/icons-vue',
- // replacement: '@cacp/svg-icons'
- // },
- // {
- // find: /^@cacp\/ui(\/(es|lib))?$/,
- // replacement: fileURLToPath(
- // new URL('/home/dujianyong/桌面/cacp-ui-web/packages/cacp-ui/index.ts', import.meta.url)
- // )
- // }
- // ]
- // },
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
- '@element-plus/icons-vue': '@cacp/svg-icons'
- }
- },
- server: {
- port: 8080,
- // 是否自动在浏览器打开
- open: true
- }
- })
|