1 Star 4 Fork 3

我的课程/mldong-course-vue3

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.ts 877 Bytes
一键复制 编辑 原始数据 按行查看 历史
mldong 提交于 2023-05-05 07:59 . fix:ifShow逻辑bug及打包报错问题
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: [
{
find: /\/@\//,
replacement: path.resolve(__dirname, 'src') + '/'
}
]
},
server: {
proxy: {
"/api": {
'target': 'http://127.0.0.1:4523/m1/1299731-0-default',
'changeOrigin': true,
'rewrite': (path) => path.replace(/^\/api/,"")
}
}
},
build: {
target:['edge90','chrome90','firefox90','safari15'],
rollupOptions: {
output: {
manualChunks: {
// lodash-es库单独打包
'lodash-es': ['lodash-es'],
'icons-vue': ['@ant-design/icons-vue'],
}
}
},
chunkSizeWarningLimit: 3000, // 包警告限制值,默认500k
},
plugins: [vue()],
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/course666/mldong-course-vue3.git
git@gitee.com:course666/mldong-course-vue3.git
course666
mldong-course-vue3
mldong-course-vue3
master

搜索帮助