WDS v4 cross-domain iframe content script issue example
When developing for chrome extensions, triggering hot reload in a page with a cross-domain iframe that has an injected content script causes the iframe to reload infinitely, even when the change is not on the injected content script.
Checking the browser console shows that HMR tries to load the *.hot-update.json
file via the iframe's domain, and continues to reload and fail infinitely.
This bug did not occur in webpack-dev-server v3.11.2. An example of this can be found in the wds-3.11.2
branch.
Way to reproduce
- Clone repo,
yarn install
yarn serve
- Drag the
dist
folder intochrome://extensions/
with Developer mode enabled. - Open the example page via the extension's browser action:
- Trigger hot reload by changing the value(s) of the variables in
page-script.js
.