We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c646847 commit 7477a37Copy full SHA for 7477a37
1 file changed
scripts/build.js
@@ -15,4 +15,14 @@ readdirSync(cjsDir).forEach((file) => {
15
}
16
});
17
18
+// Rename .js -> .mjs in ESM folder
19
+const esmDir = join(process.cwd(), 'lib/esm');
20
+readdirSync(esmDir).forEach((file) => {
21
+ if (file.endsWith('.js')) {
22
+ const oldPath = join(esmDir, file);
23
+ const newPath = join(esmDir, file.replace(/\.js$/, '.mjs'));
24
+ renameSync(oldPath, newPath);
25
+ }
26
+});
27
+
28
console.log('✅ Build complete: ESM (.js) + CJS (.cjs)');
0 commit comments