8 Star 1 Fork 16

openEuler/easy-software

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.ts 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
ailoooong 提交于 2024-07-17 15:00 . fix: 验收问题修改
// import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import path from 'path';
import Icons from 'unplugin-icons/vite';
import { FileSystemIconLoader } from 'unplugin-icons/loaders';
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({
plugins: [
vue(),
vueJsx(),
AutoImport({
resolvers: [ElementPlusResolver({ importStyle: 'sass' })],
}),
Components({
resolvers: [ElementPlusResolver({ importStyle: 'sass' })],
}),
Icons({
compiler: 'vue3',
customCollections: {
app: FileSystemIconLoader('./src/assets/svg-icons'),
pkg: FileSystemIconLoader('./src/assets/icon'),
},
}),
],
css: {
preprocessorOptions: {
scss: {
additionalData: `
@use "@/assets/style/element-plus/var.scss" as *;
@use "@/assets/style/mixin/screen.scss" as *;
@use "@/assets/style/mixin/font.scss" as *;
@use "@/assets/style/mixin/common.scss" as *;
`,
},
},
},
resolve: {
alias: {
'@/': `${path.resolve(__dirname, './src')}/`,
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
},
},
server: {
proxy: {},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler/easy-software.git
git@gitee.com:openeuler/easy-software.git
openeuler
easy-software
easy-software
master

搜索帮助