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(
`module.exports = {`,
"/* @Annotate start: the CommonJS named exports for ESM import in node */",
`0 && (module.exports = {`,
"/* @Annotate_start: the CommonJS named exports for ESM import in node */",
...cjs_module_lexer,
"/* @Annotate end */",
"/* @Annotate_end */",
`});`,
`module.exports = {`,
...cjs_export_list,
`};`,
);