test: 小文件合并

This commit is contained in:
dataeaseShu 2024-09-03 11:22:57 +08:00
parent 4cab6f50e5
commit 644cb07b01

View File

@ -21,9 +21,6 @@ export default {
entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`, entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`,
manualChunks(id: string, { getModuleInfo }) { manualChunks(id: string, { getModuleInfo }) {
if (id.includes('node_modules')) { if (id.includes('node_modules')) {
if (getModuleInfo(id).code.length < 10000) {
return 'node_modules_de'
}
return id.toString().split('node_modules/')[1].split('/')[0].toString() return id.toString().split('node_modules/')[1].split('/')[0].toString()
} else if (id.includes('.vue') && getModuleInfo(id).code.length < 10000) { } else if (id.includes('.vue') && getModuleInfo(id).code.length < 10000) {
return 'vendor' return 'vendor'