Closed Skn0tt closed 11 months ago
Closes https://github.com/blitz-js/superjson/issues/260.
This PR makes SuperJSON an esm-only module. ESM is supported in all actively-supported versions of Node.js, so it's fine to make the switch.
The changes i've made are based on this guide by Axel Rauschmayer: https://2ality.com/2021/06/typescript-esm-nodejs.html.
In the process, I'm also changing the supported Node.js versions to >= 16, because Node.js v14 reached EOL earlier this year.
>= 16
I was intending to publish a prerelease with 04f078e, but apparently NPM took it as latest 😅
latest
Well, let's get this published as v2!
Closes https://github.com/blitz-js/superjson/issues/260.
This PR makes SuperJSON an esm-only module. ESM is supported in all actively-supported versions of Node.js, so it's fine to make the switch.
The changes i've made are based on this guide by Axel Rauschmayer: https://2ality.com/2021/06/typescript-esm-nodejs.html.
In the process, I'm also changing the supported Node.js versions to
>= 16
, because Node.js v14 reached EOL earlier this year.