Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include nested files in ESM compilation #30441

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/prepare/tsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
options: { ...compilerOptions, module: ts.ModuleKind.ES2020, declaration: false },
}).emit();

const files = globSync(join(process.cwd(), 'dist', '*.js'));
const files = globSync(join(process.cwd(), 'dist', '**/*.js'));
await Promise.all(files.map((file) => move(file, file.replace('.js', '.mjs'), {})));
Comment on lines +62 to 63
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding error handling around the file move operations in case of permission issues or disk space constraints


ts.createProgram({
Expand Down