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
I believe this is related with #3043 also it's correct behavior as-is currently.
Linked issue's comment explains it
See @RyanCavanaugh's comment here: microsoft/TypeScript#41887 (comment)
TypeScript doesn't modify JavaScript code you write, the import path you write should be the one you want to appear in the output .js file
An import path cannot end with a '.ts' extension. Consider importing './some.js' instead.
If swc's bundler or other tool's resolver cannot resolve module with full extension (I believe for some cases it's failing) that's something to fix, but I believe swc should not try to modify import specifier by its own.
/cc @kdy1 , in my opinion I'd like to suggest to close this - and if we need, we can implement error out as same as tsc does.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
Input code
Config
Result
Expected result
The import statement must be with
.js
. Not.ts
Version
The version of @swc/core: 1.2.37
The text was updated successfully, but these errors were encountered: