1 Star 0 Fork 54

隔壁老王/arco-work

forked from 清清玄/arco-work 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
vite.config.ts 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
jxl 提交于 2022-01-16 21:17 . publish v0.0.2
import vue from '@vitejs/plugin-vue'
import viteSvgIcons from 'vite-plugin-svg-icons'
import path from 'path'
import { defineConfig } from 'vite'
import dotenv from 'dotenv'
export default defineConfig(({ mode }) => {
const dotenvConfig = dotenv.config({ path: `./.env.${mode}` })
const dotenvObj = dotenvConfig.parsed
return {
base: dotenvObj.BUILD_PATH,
build: {
outDir: dotenvObj.BUILD_OUT_DIR || 'dist',
},
plugins: [
vue(),
viteSvgIcons({
iconDirs: [path.resolve(process.cwd(), 'src/icons')],
symbolId: 'icon-[dir]-[name]',
}),
],
css: {
preprocessorOptions: {
less: {
additionalData: `@import "src/styles/variables.less";`,
modifyVars: {},
javascriptEnabled: true,
},
},
},
resolve: {
alias: [
{
find: '@/',
replacement: path.resolve(process.cwd(), 'src') + '/',
},
],
},
server: {
open: true,
},
optimizeDeps: {
include: [],
exclude: ['vue-demi'],
},
}
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shandianex1_admin/arco-work.git
git@gitee.com:shandianex1_admin/arco-work.git
shandianex1_admin
arco-work
arco-work
master

搜索帮助