You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that if a target of es2023 or es2024 is used in the tsconfig then the toTsTarget function will return undefined which then will cause the swc transformation to revert to its default which appears to be es5.
This issue is a request to add support for tsconfig targets of es2023 and es2024 to match that of swc.
Thanks!
The text was updated successfully, but these errors were encountered:
shawnmcknight
changed the title
Add support for es2023 and es2024 targets
[@swc-node/register] - Request to add support for es2023 and es2024 targets
Feb 18, 2025
In swc-project/swc#9700, support was added to swc for targets
es2023
andes2024
.swc-node/register
does not appear to support those targets:swc-node/packages/register/read-default-tsconfig.ts
Lines 56 to 82 in 6cdcf2c
It appears that if a target of
es2023
ores2024
is used in the tsconfig then thetoTsTarget
function will returnundefined
which then will cause the swc transformation to revert to its default which appears to bees5
.This issue is a request to add support for tsconfig targets of
es2023
andes2024
to match that of swc.Thanks!
The text was updated successfully, but these errors were encountered: