更新vite
This commit is contained in:
@@ -13,7 +13,7 @@ export default defineConfig({
|
||||
vue({
|
||||
template: {
|
||||
compilerOptions: {
|
||||
isCustomElement: tag => tag.endsWith('-element') // 忽略自定义元素
|
||||
isCustomElement: (tag) => tag.endsWith('-element') // 忽略自定义元素
|
||||
}
|
||||
}
|
||||
}),
|
||||
@@ -24,7 +24,7 @@ export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
'vue': 'vue/dist/vue.esm-bundler.js'
|
||||
vue: 'vue/dist/vue.esm-bundler.js'
|
||||
}
|
||||
},
|
||||
build: {
|
||||
@@ -33,7 +33,7 @@ export default defineConfig({
|
||||
// 配置代码分割
|
||||
manualChunks: {
|
||||
// 将Vue相关库打包到单独的chunk中
|
||||
vue: ['vue', 'vue-router', 'pinia'],
|
||||
vue: ['vue', 'pinia'],
|
||||
// 将UI库打包到单独的chunk中
|
||||
ui: ['naive-ui'],
|
||||
// 将工具库打包到单独的chunk中
|
||||
@@ -48,4 +48,4 @@ export default defineConfig({
|
||||
// 启用CSS代码分割
|
||||
cssCodeSplit: true
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user