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
A similar functionality was already implemented in #5510 but the implementation only tries once to either resolve $module.ts or $module.tsx (depending on the extension used in the import).
TypeScript typecheck does not complain when using .js and there only exist a corresponding .tsx module. So Vite would behave closer to how TypeScript works when this would be implemented, following basically the same reasoning as in the aforementioned merged PR.
Suggested solution
Vite could also try to resolve a module using .tsx (instead of only .ts) even if the import uses just .js.
Clear and concise description of the problem
A similar functionality was already implemented in #5510 but the implementation only tries once to either resolve
$module.ts
or$module.tsx
(depending on the extension used in the import).TypeScript typecheck does not complain when using
.js
and there only exist a corresponding.tsx
module. So Vite would behave closer to how TypeScript works when this would be implemented, following basically the same reasoning as in the aforementioned merged PR.Suggested solution
Vite could also try to resolve a module using
.tsx
(instead of only.ts
) even if the import uses just.js
.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: