This commit is contained in:
piyongcai 2022-05-13 17:14:38 +08:00
parent 3b3f6c903a
commit 7cb6217258
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ const vendorLibs: { match: string[]; output: string }[] = [
// @ts-ignore
export const configManualChunk: GetManualChunk = (id: string) => {
if (/[\\/]node_modules[\\/]/.test(id)) {
const matchItem = vendorLibs.find((item) => {
const matchItem = vendorLibs.find((item) => { // test
const reg = new RegExp(`[\\/]node_modules[\\/]_?(${item.match.join('|')})(.*)`, 'ig');
return reg.test(id);
});