Skip to content

Commit

Permalink
fix: 多客户端场景下,cjs文件语法错误
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Oct 17, 2024
1 parent 9751a58 commit a19a970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/rebuild-dist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const rebuildDist = async (
);
backupCJS = backupCJS.replace(
/(__export\(.+?_exports, {)/,
`$1\n${classNames.map((className) => `${className}: () => ${className},`)}`,
`$1\n${classNames.map((className) => `${className}: () => ${className},`).join('\n')}`,
);
await writeFile(path.join(distDir, 'index.js'), backupCJS);
}
Expand Down

0 comments on commit a19a970

Please sign in to comment.