1 Star 3 Fork 0

justorez/peppa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
justorez 提交于 2024-03-31 21:50 . chore: rename dirname
import { fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import VueRouter from 'unplugin-vue-router/vite'
import { VueRouterAutoImports } from 'unplugin-vue-router'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
import { visualizer } from 'rollup-plugin-visualizer'
const resolve = (p: string) => fileURLToPath(new URL(p, import.meta.url))
// https://vitejs.dev/config/
export default defineConfig({
base: '/peppa/',
resolve: {
alias: {
'@': resolve('./src'),
src: resolve('./src')
}
},
plugins: [
// https://npmmirror.com/package/unplugin-vue-router
VueRouter({
routesFolder: [{ src: 'src/pages' }],
dts: 'types/typed-router.d.ts'
}),
// Vue must be placed after VueRouter()
vue(),
// https://npmmirror.com/package/unplugin-auto-import
AutoImport({
imports: ['vue', VueRouterAutoImports],
dts: 'types/auto-imports.d.ts'
}),
// https://npmmirror.com/package/unplugin-vue-components
Components({
dirs: ['src/components'],
dts: 'types/components.d.ts',
resolvers: [IconsResolver()]
}),
// https://npmmirror.com/package/unplugin-icons#h-auto-importing
// https://icones.js.org
Icons({
compiler: 'vue3',
autoInstall: true,
scale: 1.5,
defaultClass: 'cursor-pointer'
}),
// analyze bundle size
visualizer()
]
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/justorez/peppa.git
git@gitee.com:justorez/peppa.git
justorez
peppa
peppa
main

搜索帮助