Why my NextJS 15 project with type:module don't require all these .js suffix ? #75769
Unanswered
nicolas-zozol
asked this question in
Help
Replies: 3 comments 1 reply
-
@nicolas-zozol your issue may be related to this one: #46078 |
Beta Was this translation helpful? Give feedback.
0 replies
-
What moduleResolution, do you have setup? (assuming you got TS installed) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have this one:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm going crazy with commonJS/ESM/NodeNext rules....
So I finally decided to add .js everywhere. There is a great tool called ts2esm that makes most of the work.
Then it appears that NextJS don't care of .js extensions, even with RSC and type:module.
I guess it works on Node. Is it an old version ? Is there a flag or a trick ?
I want to understand because I don't want to release an ESM bomb to my future clients that will receive my code.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions