-
Notifications
You must be signed in to change notification settings - Fork 19
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
Typescript cannot resolve module due to "exports" in package.json #280
Comments
i did find this simple work around
|
Thanks for pointing this out @gvkhna! I'm trying to reproduce different setups people might use in the |
This tool also reports a couple of other issues with the package.json: https://publint.dev/maplibre-contour@0.0.7 |
Awesome tool I didn't know about. Nice find! Can confirm this solves the problem on my end as it recommends. "exports": {
"module": "./dist/index.mjs",
"require": "./dist/index.cjs",
"types": "./dist/index.d.ts"
}, Adding the types lets typescript find it. |
Hey, great plugin!
I see you're trying to integrate this into maplibre, that would be amazing. I'm encountering a small issue with typescript where by default my setup is not able to resolve the module. It's due to this part of the package.json
which is incorrect for a esm module AFAIK. Once I remove that indeed typescript finds it right away. As well I ran
tsc --traceResolution
and it points toCan this small issue be fixed? I'm surprised I seem to be the only one having the issue perhaps I'm missing something in my tsconfig json?
Thanks!
The text was updated successfully, but these errors were encountered: