-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
Description
When importing wretch in a typescript project where target is set to cjs will yield the following error:
TS1479: The current file is a CommonJS module whose imports will produce require calls; however, the referenced file is an ECMAScript module and cannot be imported with require. Consider writing a dynamic import(wretch)' call instead.
the error is cause by hybriding cjs and esm and mark type: "module"
1 of the suggestion I can find so far is to explicitly generate a .d.cts
file and update package.json to point to it