I was noticing huge bundle sizes for my app until I used --experimental-scope-hoisting
See original GitHub issueš Feature Request
Iām hoping a reference could be made somewhere in the docs to the possibility of seeing larger bundle sizes than one mightāve noticed using a rollup config. Or I suppose thereās a possibility @DeMoorJasper might know why bundle sizes might be getting larger with a parcel approach than the rollup approach. Either way, Iām grateful for this plugin and expect more and more people will start using it as Svelte gets more popular.
Detailed description
My prod bundles were nearly 3X the size using parcel (and this plugin) than they were when I was used rollup.
Similar to an existing solution?
I could not find the right combinations of configs to get my bundles sizes small again.
Possible work-around?
I came across the --experimental-scope-hoisting
flag in parcelās docs and it drastically reduced by bundle sizes again and my app still worked!
Related to a problem?
I assume is has something do with svelte things not getting de-duped or something but did not dig into it very far.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
It should probably be here: https://parceljs.org/production.html#optimisations but itās experimental so we didnāt really wanna push people to using it yet. Weāll definitely push people to use it in Parcel 2, as it will be opt out.
The docs for that will be out soonish
Thanks, yeah Rich would know best how to utilize the two together for sure! Iām thinking some mention of this possible issue with bundles sizes might be valuable in the docsā¦it wouldāve helped me, I feel like I got sort of lucky to stumble across the flag. If scope-hoisting is going to be on by default in Parcel 2, it could be useful to note that in the docs as well, e.g., if you notice larger bundle sizes than your rollup config, consider this flag or Parcel 2ā¦idk š, something like that under the Configuration section of the README I suppose.