Skip to content

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

Merged
devongovett merged 1 commit into
masterfrom
hmr-new-css-bundle
Mar 12, 2019
Merged

Regenerate all bundles and trigger an HMR page reload when a new bundle is created#2762
devongovett merged 1 commit into
masterfrom
hmr-new-css-bundle

Conversation

@devongovett

Copy link
Copy Markdown
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.

1 participant