import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(),
Components({
resolvers: [
AntDesignVueResolver(),
],
})],
resolve:{
alias:{
'@':'/src/',
}
},
build: {
chunkSizeWarningLimit: 8000,
rollupOptions: {
output: {
// 分包
manualChunks(id) {
if (id.includes("node_modules")) {
return id
.toString()
.split("node_modules/")[1]
.split("/")[0]
.toString();
}
},
},
},
},
})
vite打包报错
最新推荐文章于 2024-07-04 15:22:55 发布