Skip to content
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

Potential fix to parcel bundling issues when asset parent & commonBundle types differ #380

Merged
merged 1 commit into from
Dec 30, 2017

Conversation

ssuman
Copy link
Contributor

@ssuman ssuman commented Dec 22, 2017

#294 #326
This PR potentially fixes the issues mentioned above. It does the following
case (i):
If the below is true => i.e both types are the same (parent Bundle is JS and commonBundle is also JS) move it the common ancestor.

if (
          asset.parentBundle !== commonBundle &&
          asset.parentBundle.type === commonBundle.type
        ) {
          this.moveAssetToBundle(asset, commonBundle);
          return;
        }

case 2:
If they aren't the same, for eg: parentBundle is JS and commonBundle is HTML. Then allow it to continue further so that it adds this asset to the immediate parent.

case 3:
If both parent bundles are equal, then just return.

if (asset.parentBundle !== bundle) {

@ssuman ssuman changed the title Potential fix - Parcel bundling issues when asset parent & commonBundle types are different Potential fix to parcel bundling issues when asset parent & commonBundle types differ Dec 22, 2017
@devongovett
Copy link
Member

Thanks for tracking this down and fixing! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants