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
Currently doesnt work on typescript projects that has the relative files referenced as with ".js". This behavior must be included in this package. Example:
importChangesetfrom"./changeset.js";// clicking on gf should go to ./changeset.tsimportRevisionHistoryfrom"./revision-history.ts";importSerializer,{transformValue}from"./serializer.js";console.log(Changeset,RevisionHistory,Serializer,transformValue);
This is actually an unfortunate best practice decided by the typescript team, they are on purpose not changing typescript compiler behavior for years and advocate for the use of .js extensions for projects that build/transpile for node.js ESM imports. In order to build a typescript file that typechecks, transpiles correctly to ES module it is expected to be referenced as "./module.js" even if the file is actually a "./module.ts".
Currently doesnt work on typescript projects that has the relative files referenced as with ".js". This behavior must be included in this package. Example:
This is actually an unfortunate best practice decided by the typescript team, they are on purpose not changing typescript compiler behavior for years and advocate for the use of .js extensions for projects that build/transpile for node.js ESM imports. In order to build a typescript file that typechecks, transpiles correctly to ES module it is expected to be referenced as "./module.js" even if the file is actually a "./module.ts".
Related references:
microsoft/TypeScript#16577 (comment) <- The relevant github issue
https://stackoverflow.com/questions/62619058/appending-js-extension-on-relative-import-statements-during-typescript-compilat/62626938#62626938
The text was updated successfully, but these errors were encountered: