1 Star 0 Fork 4

luzhijun/myblog-pc

forked from cuiliang/myblog-pc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vite.config.js 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
cuiliang 提交于 2023-09-10 16:10 . 设置语言默认为中文
import {defineConfig,loadEnv} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from "path";
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import VueSetupExtend from 'vite-plugin-vue-setup-extend'
// https://vitejs.dev/config/
export default defineConfig(({mode}) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())};
return {
resolve: {
alias: {
"@": resolve(__dirname, "src")
}
},
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
VueSetupExtend()
],
optimizeDeps: {
include: ['@kangc/v-md-editor/lib/theme/vuepress.js'],
},
build: {
minify: 'terser',
terserOptions: {
compress: {
//生产环境时移除console
drop_console: process.env.VITE_DROP_CONSOLE,
drop_debugger: process.env.VITE_DROP_DEBUGGER
},
},
},
}
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/luzhijun2023/myblog_pc.git
git@gitee.com:luzhijun2023/myblog_pc.git
luzhijun2023
myblog_pc
myblog-pc
master

搜索帮助