-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Parcel Bundling issues #294
Labels
Comments
This was referenced Dec 21, 2017
This issue is real, discussed in #326 and reproducible with this repo. |
Closed
Should be fixed by #380. |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🐛 bug report
Parcel currently builds a bundle tree. While building the tree, if it finds a common module, it finds the common ancestor bundle and places the common module in that ancestor bundle. Now this only works if the asset's parent bundle and the common bundle are the same type. For example: both are of type JS.
There are various cases where the asset's parent bundle type is not the same as the common bundle type. Few cases shown below -
Case (i):
case (ii):
case (iii):
🤔 Expected Behavior
case (i): Util.js should be bundled in both bundles B2 and B3.
case (ii): Not sure, but I think a hashed Util.js file should be referenced in index.html. Additionally, util.js should also be present in Bundles B2 and B3.
case (iii): A stylesheet should be appended to the head of both html files ( index.html and other.html).
😯 Current Behavior
case (i): Util.js is present only in bundle B2. So we get module not found exception.
case (ii): Same as case i. In addition, html file has a hash reference to util.js but is never created.
case (iii): CSS stylesheet is appended only to either other.html or index.html based on the order of execution.
💁 Possible Solution
I'm not 100% sure. I think we need to treat each html nodes as boundaries. The common chuck can't be moved beyond the boundary. It should be treated as an isolated entity. Although I'm not sure if this would address all the cases. But would love to work on this PR after some discussion,
🌍 Your Environment
The text was updated successfully, but these errors were encountered: