Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

DeMoorJaspercommented, Mar 12, 2020

It should probably be here: 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

longrunningprocesscommented, Mar 12, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scope hoisting - Parcel
In production builds, Parcel concatenates modules into a single scope. This is called "scope hoisting". Parcel also statically analyzes the imports and ...
Read more >
Optimizing JavaScript Through Scope Hoisting | by Aaron Hardy
An exploration of bundling techniques, and how we put our code on a scope hoisting diet.
Read more >
Parcel v1.9.0 — Tree Shaking, 2x faster watcher, and more!
The biggest new feature in Parcel v1.9.0 is tree shaking! ... reducing the file sizes and initialization times of bundles considerably.
Read more >
Bundling Clinical Preventive Services: A Review of Definitions ...
Variations on the word “bundle” (bundling, bundled) were used in conjunction with such terms as clinical care, preventive services, prevention,.
Read more >
Posterior Knee Arthroscopy: Anatomy, Technique, Application
mined the position of the popliteal neurovascular bundle in ... tions, the 70° arthroscope can be used to enhance the field of vi-...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found