We run our build using sucrase to transpile TS without type-checking (and rely on editors and ESLint to provide typing errors). This plugin is very useful as sucrase does not perform path substitution - however, it assumes every resolved path needs to have its extension replaced with .js (see this line) - which is not the case, since those imports are then transpiled by sucrase anyway.
This causes sucrase to not find the imported modules, since the modules are still present in .tsx? form
Proposal
Provide an option to disable extension substituion with .js.
Use case
We run our build using
sucrase
to transpile TS without type-checking (and rely on editors and ESLint to provide typing errors). This plugin is very useful assucrase
does not perform path substitution - however, it assumes every resolved path needs to have its extension replaced with.js
(see this line) - which is not the case, since those imports are then transpiled bysucrase
anyway.This causes
sucrase
to not find the imported modules, since the modules are still present in.tsx?
formProposal
Provide an option to disable extension substituion with
.js
.