1
This commit is contained in:
1 parent
a10359f7e0
commit
62546bc937
5 files changed
+107
-22
No files matched your search
+21
-5
@@ -29,11 +29,27 @@ export default defineConfig({
|
||||
entryFileNames: 'static/js/[name]-[hash].js',
|
||||
// 自定义 css 文件名
|
||||
assetFileNames: 'static/[ext]/[name]-[hash].[ext]',
|
||||
// 拆分第三方依赖(如 vue、axios 单独打包)
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||||
}
|
||||
codeSplitting: {
|
||||
minSize: 20 * 1024,
|
||||
groups: [
|
||||
{
|
||||
name: 'vendor-ag-grid',
|
||||
test: /node_modules[\\/](ag-grid-community|ag-grid-enterprise|ag-grid-vue3|@ag-grid-community)[\\/]/,
|
||||
priority: 30,
|
||||
entriesAware: true,
|
||||
maxSize: 450 * 1024
|
||||
},
|
||||
{
|
||||
name: 'vendor-vue',
|
||||
test: /node_modules[\\/](vue|pinia|@vue|pinia-plugin-persistedstate)[\\/]/,
|
||||
priority: 20
|
||||
},
|
||||
{
|
||||
name: 'vendor-ui',
|
||||
test: /node_modules[\\/](reka-ui|@floating-ui|lucide-vue-next|@iconify[\\/]vue)[\\/]/,
|
||||
priority: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user