Closed aminya closed 3 years ago
@devongovett Is my analysis for this huge size reduction correct? The improvements are too good to believe 😄 🚀 If so, I think this can show up in the documentation of Parcel somewhere.
I think the drastic change was caused by me running babel dist --out-dir dist --plugins babel-plugin-transform-globalthis --retain-lines
manually after the build because of this Parcel issue. The issue seems to be fixed now.
Before the manual babel build, the size of the index is 62.98 KB but after that, it becomes 93.299. So still the other improvements of this PR are giving a 7 KB reduction, but the majority of it comes from not doing this manual babel transformation.
This reduces the size of the productions files from 145 KB to 88 KB 🚀
This improvement is achieved by using Parcel's built-in transformers instead of the previous babel plugins (which were doing more than what we actually need!) and by using terser-config-atomic
After
Before