Understanding size of generated parcel code
bbarker opened this issue · 5 comments
There are a few different of these react numbers, all coming in around ~100K minified.
When I look at the generated production js file from npm run prod
in this project, it is 976K, so about an order of magnitude increase in size. Not sure what might be the source of this increase.
As a side note, I tried running closure compiler on the parcel ouptput e.g.:
closure-compiler -O ADVANCED --module_resolution=NODE --process_common_js_modules --js_output_file=out.js static.7733e768.js
But it seems to be a rather serious undertaking and the above command was not good enough to make it work.
Thanks for taking a look. I hadn't paid any attention to the file sizes yet, but I'm going to investigate.
@bbarker I have turned on purescript optimisations for prod builds, and also pass the bundle output through closure compiler. The bundle size is less than 300kb now.
Closing this. Feel free to re-open if needed.
Just a note, this might be an interesting read if the issue is revisited later with advanced optimizations in mind: https://www.stefan-fehrenbach.net/blog/2018-02-25-purescript-and-google-closure-notes/index.html