-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(core): add support for loading .ts files using ESM #21268
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 6d26115. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
3b41064
to
b56ce6d
Compare
de46274
to
27b369c
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This PR adds the ability to use ESM with
.ts
files. The strategy is as follows:module.register
function to programmatically register ESM loaders (introduced in Node 20.6.0), fork the CLI again with the--experimental-loader ts-node/esm
option.registerTsProject
function will also register the ESM loader.Fixes
@nx/playwright/plugin
to be able to use ESM inplaywright.config.ts
file. Now, Epic Stack doesnx init
properly. :)Performance impact
Based on local testing, reloading the process for Node < 20.6 is adding ~10ms to the Nx CLI. If this is a problem we can remove the logic from
init-local.ts
and ask users to update their Node version.