We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Playground link with relevant code
==> reproduce1.cjs <== require('@sinclair/typebox') ==> reproduce2.mjs <== await import('@sinclair/typebox') ==> /path/to/node_modules/@sinclair/typebox/cjs/package.json <== {"type":"commonjs"} ==> /path/to/node_modules/@sinclair/typebox/esm/package.json <== {"type":"module"}
https://github.com/loynoir/typebox/blob/feat-esm/package.json#L13-L56
reproduce1.cjs
require('@sinclair/typebox')
dts resolve to node_modules/@sinclair/typebox/cjs/typebox.d.ts
node_modules/@sinclair/typebox/cjs/typebox.d.ts
reproduce2.mjs
await import('@sinclair/typebox')
dts resolve to node_modules/@sinclair/typebox/esm/typebox.d.ts
node_modules/@sinclair/typebox/esm/typebox.d.ts
sinclairzx81/typebox#400 (comment)
#53948
#52593
The text was updated successfully, but these errors were encountered:
ESM resolution is not broken across the board.
It sounds like you have moduleResolution set to "node" or "classic"; it should be "node16".
moduleResolution
Please create a complete repro (including tsconfig.json) in a new issue if you have found a bug. Thanks!
Sorry, something went wrong.
"node12"
Preeetttyyy sure that won’t work. 😉 AFAIR node12 never shipped and node16 is the lowest (barring legacy node), right?
node12
node16
node
😵💫 thanks
Close in favor of #53958
No branches or pull requests
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
https://github.com/loynoir/typebox/blob/feat-esm/package.json#L13-L56
🙁 Actual behavior
reproduce1.cjs
dts resolve to
node_modules/@sinclair/typebox/cjs/typebox.d.ts
reproduce2.mjs
dts resolve to
node_modules/@sinclair/typebox/cjs/typebox.d.ts
🙂 Expected behavior
reproduce1.cjs
dts resolve to
node_modules/@sinclair/typebox/cjs/typebox.d.ts
reproduce2.mjs
dts resolve to
node_modules/@sinclair/typebox/esm/typebox.d.ts
Related
sinclairzx81/typebox#400 (comment)
#53948
#52593
The text was updated successfully, but these errors were encountered: