Closed felixfbecker closed 9 months ago
Can confirm, this is needed for ESM to work and won't break CJS.
@muratgozel Could you please have a look and merge this? It ensure compatibility with typescript ESM while not affecting other use cases.
hi all, there was more to do with type generation, importing and other kind of stuff, i had to handled it by myself. all should be fixed now. closing this pr but please let me know if you have any other problems. sorry for the late action
Currently,
mimetext
cannot be imported in latest TypeScript versions using ESM because TypeScript will expect atypes
field underexports
ifexports
is used, meaning it cannot find the types for the module.See https://arethetypeswrong.github.io/?p=mimetext%403.0.16
This PR adds the
types
fields to eachexports
field, making the package importable in latest TypeScript and ESM settings. The oldtypes
field is preserved for BC.