I am currently generating my final code using this combination:
psc-package build purs bundle 'output/**/*.js' -m Main --main Main -o app.js
The output size is very large: 471K.
Gzip can bring this down for bandwidth motivations, but the uncompressed size also places a burden on the client (especially low end mobile phones), and therefore the non-gzipped size of the JS is a concern.
In the past on Fay and GHCJS, I would throw JS output like this at Closure Compiler or UglifyJS, but you have to prepare JS output to cater well to Closure Compiler, and UglifyJS brings it to about 202K.
So, what are y’all doing to bring down those numbers? (Besides gzip and pray.)
I’m looking at zephyr, webpack and rollup. What are your experiences with these? webpack and rollup have wide use, so perhaps they can be considered the modern versions of Closure Compiler and UglifyJS. But I’m concerned about the realiability of something like zephyr which has a small community of users; how do I know it won’t break my code in subtle ways? Experiences?
Coming from a Haskell background I prefer to use Haskell binaries that I can pindown and shy away from installing node; else if a node app is the only option I’d definitely be using docker as a hazmat suit to protect against the moving parts ecosystem of nodejs.
Interested to hear any opinions and experiences.