Skip to content

Commit cac6b7a

Browse files
committed
chore(build): add verbose logging for module2.module.exports fix
Add debug logging to show when module2.module.exports lines are being removed from external bundles. This helps verify the fix is working correctly during builds.
1 parent a690786 commit cac6b7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/fix-commonjs-exports.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ async function processDirectory(dir, verbose = false) {
359359
/[ \t]*module2\.module\.exports\s*=\s*[^;]+;[ \t]*\n?/g
360360
const matches = [...content.matchAll(pattern)]
361361

362+
if (matches.length > 0 && verbose) {
363+
console.log(
364+
` Removing ${matches.length} module2.module.exports lines from ${path.basename(fullPath)}`,
365+
)
366+
}
367+
362368
// Process matches in reverse order to maintain correct indices
363369
for (let i = matches.length - 1; i >= 0; i--) {
364370
const match = matches[i]

0 commit comments

Comments
 (0)