fix(es/helpers): Do not duplicate property names (#7266)

**Related issue:**

 - Closes #7264.
This commit is contained in:
magic-akari 2023-04-15 09:30:43 +08:00 committed by GitHub
parent cfc53fe0df
commit 30a4e52f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,10 +67,12 @@ modules.forEach((p) => {
}); });
indexCJS.push( indexCJS.push(
`module.exports = {`, `0 && (module.exports = {`,
"/* @Annotate start: the CommonJS named exports for ESM import in node */", "/* @Annotate_start: the CommonJS named exports for ESM import in node */",
...cjs_module_lexer, ...cjs_module_lexer,
"/* @Annotate end */", "/* @Annotate_end */",
`});`,
`module.exports = {`,
...cjs_export_list, ...cjs_export_list,
`};`, `};`,
); );