-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ESM #47552
Comments
Did you update your |
@samcx No, but I'm not sure how that is relevant. Also using CJS is a step in the wrong direction too. In the source code, one can see |
I can confirm this. here is a repro: https://github.com/balazsorban44/next-submodules-ts-nodenext I took at stab at it in #61525 but as expected, it broke a lot of things. I'll see how we can tackle this more incrementally. |
@balazsorban44 @samcx is this a duplicate of this other issue over here? (the other issue has more upvotes and also a different PR #50357 from @lucgagan which aims to resolve it) If yes, then these internal Linear tracking numbers are also duplicates: |
@karlhorky That seems so, let's close this one and keep the older one. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 16.19.0 npm: 8.19.3 Yarn: 1.22.19 pnpm: 7.11.0 Relevant packages: next: 13.2.4 eslint-config-next: 13.2.4 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
TypeScript
Link to the code that reproduces this issue
N/A
To Reproduce
Make app be ESM:
"type": "module",
inpackage.json
"module": "NodeNext",
intsconfig.json
"moduleResolution": "nodenext",
intsconfig.json
Watch imports from e.g.
next/head
fail.Describe the Bug
Next.js is not an ESM package.
Expected Behavior
Next.js should be an ESM package.
Which browser are you using? (if relevant)
N/A
How are you deploying your application? (if relevant)
N/A
NEXT-2389
The text was updated successfully, but these errors were encountered: