flightcontrolhq / superjson

Safely serialize JavaScript expressions to a superset of JSON, which includes Dates, BigInts, and more.
https://www.flightcontrol.dev?ref=superjson
MIT License
4.12k stars 90 forks source link

superjson.registerCustom is not defined when "type": "module" #186

Closed converter-user-old closed 2 years ago

converter-user-old commented 2 years ago

When i use "type": "module" in my package.json i get a error that the function is not defined. Only if i use superjson.default.registerCustom then it works but TS will then complain.

See https://codesandbox.io/s/reverent-dream-4khu8b

Skn0tt commented 2 years ago

@all-contributors please add @ruessej for bug

allcontributors[bot] commented 2 years ago

@Skn0tt

I've put up a pull request to add @ruessej! :tada:

Skn0tt commented 2 years ago

released in 1.9.1! thank you @ruessej :)