You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the type declarations are .d.ts and the package does not have "type": "module", TypeScript assumes this package is CommonJS only despite having an ESM export when "moduleResolution": "node16" is used.
A potential fix could be changing exports include the following and creating a remapping.d.mts file identical to remapping.d.ts. This causes TypeScript to resolve to remapping.d.mts for ESM first and fallback to remapping.d.ts otherwise. This should not impact any build tools.
Because the type declarations are
.d.ts
and the package does not have"type": "module"
, TypeScript assumes this package is CommonJS only despite having an ESM export when"moduleResolution": "node16"
is used.A potential fix could be changing exports include the following and creating a
remapping.d.mts
file identical toremapping.d.ts
. This causes TypeScript to resolve toremapping.d.mts
for ESM first and fallback toremapping.d.ts
otherwise. This should not impact any build tools.The text was updated successfully, but these errors were encountered: