Skip to content
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

Types break with moduleResolution NodeNext in tsconfig.json #144

Closed
unshame opened this issue Feb 28, 2023 · 3 comments · Fixed by #145 or #146
Closed

Types break with moduleResolution NodeNext in tsconfig.json #144

unshame opened this issue Feb 28, 2023 · 3 comments · Fixed by #145 or #146
Labels

Comments

@unshame
Copy link

unshame commented Feb 28, 2023

With "moduleResolution": "NodeNext" in tsconfig.json, typescript fails to find type definitions for seamless-scroll-polyfill.

This is caused by the following issues:

  1. Lack of "types": "./lib/index.d.ts" under exports in package.json. Typescript ignores the root "types" in this mode.
  2. Type imports without file extension in source code and compiled code, i.e. https://github.com/magic-akari/seamless-scroll-polyfill/blob/master/src/scroll.ts#L11 Since this package is specified as "type": "module" in package.json, typescript uses esm path resolution in this mode.
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

🎉 This issue has been resolved in version 2.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@magic-akari
Copy link
Owner

There is still an issue with the "moduleResolution": "NodeNext" and "type":"commonjs" option.

@github-actions
Copy link

github-actions bot commented Mar 8, 2023

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants