tsconfig's allowImportingTsExtensions and the transpilation result - is there a way to set imported .ts to .js? #9016
Unanswered
mkvlrn-cm42
asked this question in
Q&A
Replies: 1 comment 8 replies
-
Search for |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not even sure if this is a good practice now or not, but I've just only found out about
allowImportingTsExtensions
intsconfig.json
, which allows me to import my esm modules using.ts
instead of.js
, which makes a bit more sense during development.So when transpiling with swc the resulting js files keep the imports as
.ts
.Is there a setting in the cli or
.swcrc
that also transforms the extension of the imports from.ts
to.js
?Beta Was this translation helpful? Give feedback.
All reactions