Hey there! First of all; thank you immensely for this package - your work on it is awesome and deeply appreciated. 😄
While working on integrating this package in a project, I ran into problems with importing the packages, especially the subpackages. It's a little difficult to pin-down between import and require and what bundlers, but when I took a look at AreTheTypesWrong (a utility that helps maintainers like us figure out how different bundlers resolve TypeScript types), I noticed things were off:
https://arethetypeswrong.github.io/?p=compromise%4014.14.3
In comparison, this is what a correctly configured library package.json looks like to TypeScript via dual-CJS/ESM publising:
This may be the root cause of some previous issues like:
#1012
#845
#862
And more.
I'll be opening a PR to address this problem without modifying your bundling solution. I'm also trying to dogfood this PR in my project to confirm it fixes the issues we're running into.
Thanks!
Hey there! First of all; thank you immensely for this package - your work on it is awesome and deeply appreciated. 😄
While working on integrating this package in a project, I ran into problems with importing the packages, especially the subpackages. It's a little difficult to pin-down between
importandrequireand what bundlers, but when I took a look atAreTheTypesWrong(a utility that helps maintainers like us figure out how different bundlers resolve TypeScript types), I noticed things were off:https://arethetypeswrong.github.io/?p=compromise%4014.14.3
In comparison, this is what a correctly configured library
package.jsonlooks like to TypeScript via dual-CJS/ESM publising:This may be the root cause of some previous issues like:
#1012
#845
#862
And more.
I'll be opening a PR to address this problem without modifying your bundling solution. I'm also trying to dogfood this PR in my project to confirm it fixes the issues we're running into.
Thanks!