-
Notifications
You must be signed in to change notification settings - Fork 159
Typescript: Not compatible with config "moduleResolution": "nodenext" #181
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
Comments
Hey @rubencosta, thanks for the issue and the PR! I am just going to respond to both of them here. I tried reproducing the error you are getting but I couldn't. Here is my test project. It's in the I ran |
Thanks for that. I did some more testing on this with
|
We can use my react-loading-skeleton-test-projects repository as a starting point for this. One thing in particular we should test is that these changes don't break compatibility with older TypeScript versions. As of this writing, the oldest version still supported by DefinitelyTyped is 4.3. (link) @RoseMagura Are you interested in working on this? |
@srmagura Thanks for the time and very useful info. Here are my 2 cents after a bit more evaluation. I did try your proposed solution and tweaks using both the test repo and my repo.
|
I prefer everything as named exports too, but I don't want to make everyone using this library refactor their imports, if it is possible to avoid. You mentioned "rollup warnings". Is this something happening in your project? What is the warning? |
@srmagura I meant these warnings in rollup config. Without testing any of the following: would it be possible to still expose the default export in parallel with the named export marking the default export as deprecated and documenting that users should move to named exports in future version? Assuming that the named export would fix this issue. |
Describe the bug
types
field is missing from package.jsonexports
main (.
) export and typescript does not fallback to the top-leveltypes
.{export defautl as ...}
import { default as ... } ...
doesn't work as of 4.8.3 microsoft/TypeScript#50690To Reproduce
Configure typescript with
"moduleResolution": "nodenext"
Actual Behavior
Typescript can't resolve the package exports and types
Expected Behavior
Typescript can resolve the package exports and types
Versions
The text was updated successfully, but these errors were encountered: