Open osdiab opened 4 years ago
We should definitely look into that. Probably we could implement all of your suggestions and get some good results.
@OliverJAsh I saw your issue here: https://github.com/gcanti/fp-ts/issues/1044
It seems all the imports in this library are also /lib/*
imports when /es6/*
imports would also allow tree shaking of those libraries (as of now this library still pulls in a lot of data when analyzing my bundle size on the side of my app). Perhaps we can emulate how gcanti achieves the separate es6
and lib
bundles here too
This was recently merged into fp-ts
: https://github.com/gcanti/fp-ts/pull/1241
just realized as well that this uses a lot of fp-ts
utilities - with just io-ts
it only uses fp-ts/Either
and fp-ts/pipeable
which results in about 10kb from that library before compression, but with io-ts-reporters
I'm getting about 50kb extra from all the fp-ts
stuff this uses - surprising to me!
When using my fork or
io-ts-reporters
which is just tracking master, the bundle size is much larger than it ought to be. This showed up on the project I am using it on.https://bundlephobia.com/result?p=@osdiab/io-ts-reporters@1.1.1
This library can potentially make use of tree shaking or something to avoid bundling the entirety of io-ts and fp-ts with it. Maybe:
sideEffects: false
inpackage.json