From 8c62a69f33b3ca14e8ce388b4bef11f48ffa86d5 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Thu, 26 Oct 2023 17:01:32 +0800 Subject: [PATCH] chore: update comment --- packages/vite/src/node/plugins/css.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index f0d2d0c38875f6..3af2329dbec176 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -827,9 +827,9 @@ export function getEmptyChunkReplacer( .join('|') .replace(/\./g, '\\.') - // require and import calls might be chained by minifier using the comma operator - // in this case we have to keep one comma - // if a next require is chained or add a semicolon to terminate the chain. + // for cjs, require calls might be chained by minifier using the comma operator. + // in this case we have to keep one comma if a next require is chained + // or add a semicolon to terminate the chain. const emptyChunkRE = new RegExp( outputFormat === 'es' ? `\\bimport\\s*["'][^"']*(?:${emptyChunkFiles})["'];`