Closed GabenGar closed 1 year ago
This package uses the package.json "exports" field. TypeScript understands "exports", but you need to change a couple settings in your tsconfig.json
for it to work.
"module": "Node16",
"moduleResolution": "Node16",
or
"module": "NodeNext",
"moduleResolution": "NodeNext",
This is probably something that would be helpful to add to the README.
Okay, I've tried with these options and it does work. The issue however is I encountered the problem while working on a Next.js
project and afaik it has some problems consuming "true" ESM code, so switching these flags is not so trivial. But it' not a problem of this package.
When building I get this error:
Reproduction:
It is an issue with type definitions because vanilla js file works fine.