This PR adds ESM support alongside the preexisting CJS.
Conditional exports, the source of some consumer-side configuration complexity in fp-ts-std, are unneeded as we're only publishing a single index module.
Publishing is now a bit less weird, this does away with publishing in dist/. The addition of the prepublish script means publishing is now as simple as yarn/npm publish without a path or prior command.
My local test repo with Webpack saw the bundle size drop from a total of (not gzipped) 74K to 13K.
Once this is merged I'll publish 0.2.1, update web, and assuming all goes well there replicate the same change to the other sum-types repos.
This PR adds ESM support alongside the preexisting CJS.
Conditional exports, the source of some consumer-side configuration complexity in fp-ts-std, are unneeded as we're only publishing a single index module.
Publishing is now a bit less weird, this does away with publishing in
dist/
. The addition of theprepublish
script means publishing is now as simple asyarn/npm publish
without a path or prior command.My local test repo with Webpack saw the bundle size drop from a total of (not gzipped) 74K to 13K.
Once this is merged I'll publish 0.2.1, update web, and assuming all goes well there replicate the same change to the other sum-types repos.