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

Regenerate all bundles and trigger an HMR page reload when a new bundle is created #2762

Merged
merged 1 commit into from Mar 12, 2019

Conversation

devongovett
Copy link
Member

Fixes #1224.

When a new bundle is created, perhaps due to a CSS file being imported from JS, the HTML needs to be regenerated to insert a tag for that new bundle. Previously this was not happening because the hash of the HTML bundle did not change so parcel did not re-package it. Now we invalidate this whenever there is a new bundle created.

In addition, we need to reload the page with HMR since the HTML could be modified.

@devongovett devongovett merged commit 161cd27 into master Mar 12, 2019
@devongovett devongovett deleted the hmr-new-css-bundle branch March 12, 2019 02:31
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.

None yet

1 participant