Closed gvkhna closed 2 weeks ago
i did find this simple work around
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"maplibre-contour": ["node_modules/maplibre-contour/dist/index"]
}
}
}
Thanks for pointing this out @gvkhna! I'm trying to reproduce different setups people might use in the test-project-*
directories so that CI can confirm that they each build successfully. Any chance you could start a PR that reproduces the error you're seeing with a minimal test project? It might be require a new test project, or possibly run an extra command in one of the existing test projects?
This tool also reports a couple of other issues with the package.json: https://publint.dev/maplibre-contour@0.0.7
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!