Skip to content

Commit 647334b

Browse files
committed
Copy d.mts files instead
1 parent 138e318 commit 647334b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/build/mts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* It's a part of the build process.
88
*/
99

10-
import { readdir, writeFile } from "fs/promises";
10+
import { readdir, copyFile } from "fs/promises";
1111
import { join, resolve } from "path";
1212

1313
const root = resolve(process.env.PACKAGE_OUTPUT_PATH || "lib");
@@ -26,7 +26,7 @@ async function createMTSFiles(dir: string): Promise<void> {
2626
promises.push(createMTSFiles(fullPath));
2727
} else if (file.isFile() && file.name.endsWith(".d.ts")) {
2828
const newFilePath = fullPath.replace(".d.ts", ".d.mts");
29-
promises.push(writeFile(newFilePath, `export * from './${file.name}'`));
29+
promises.push(copyFile(fullPath, newFilePath));
3030
}
3131
}
3232

0 commit comments

Comments
 (0)