-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update file extensions for Node TS support #6596
base: master
Are you sure you want to change the base?
Conversation
Anything stopping progress on this PR? |
.mts
as an es module file
Sorry @adrian-gierakowski, completely forgot to follow up here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs tests to ensure it works and that we don't regress on it.
@@ -20,3 +20,6 @@ export const SUPPORTS_IMPORT_ATTRIBUTES = major >= 21 || (major === 20 && minor | |||
|
|||
// https://github.com/nodejs/node/pull/52104 | |||
export const SUPPORTS_IMPORT_ATTRIBUTES_ONLY = major >= 22; | |||
|
|||
// https://github.com/nodejs/node/pull/53725 | |||
export const SUPPORTS_TYPE_STRIPPING = major > 23 || (major === 23 && minor > 6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make strip types works, you need to change pnp mjs loader and chain other loaders , because (assumption is) types stripes is implemented as loader also.
#6595 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test with simple type cast ( as any
) could written to validates this
What's the problem this PR addresses?
Fixes #6595
How did you fix it?
Always consider
mts
as ESM andcts
as CJSChecklist