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

Wrong configuration of typings for *.mjs #944

Closed
jsardev opened this issue Nov 9, 2023 · 2 comments
Closed

Wrong configuration of typings for *.mjs #944

jsardev opened this issue Nov 9, 2023 · 2 comments

Comments

@jsardev
Copy link

jsardev commented Nov 9, 2023

When someone's using your module as ESM module (*.mjs), the typings are not configured properly, resulting in warnings like this:

CleanShot 2023-11-09 at 09 56 25

I think it can be fixed by configuring the typings specificaly for import/require, like this: https://github.com/gxmari007/vite-plugin-eslint/pull/60/files

patdx added a commit that referenced this issue Nov 20, 2023
BREAKING CHANGE: Internal file import paths have changed. It should be seamless but could
potentially cause issues with older bundlers like Webpack 4. Also the deploy target has been set to
Node 18.

re #944
@patdx
Copy link
Owner

patdx commented Nov 20, 2023

Hi @jsardev, thanks for the report.

I made some updates and released a new version 2.0.0. The main change is an updated package output format to work with the new TS module resolution modes. I also confirmed it via "Are The Types Wrong":

https://arethetypeswrong.github.io/?p=zustand-rx%402.0.0

image

I hope you can give it a try when you have a chance. If you still have issues could you please share your tsconfig module and moduleResolution values to help me reproduce the issue. Thanks!

@patdx patdx closed this as completed Nov 20, 2023
@jsardev
Copy link
Author

jsardev commented Nov 29, 2023

@patdx Thank you! This issue has been resolved :)

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

No branches or pull requests

2 participants