You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build/Test Tools: Fix React Refresh hot reloading for block plugins.
The `react-refresh-entry.js` script was bundling its own copy of
`react-refresh/runtime` instead of using the `window.ReactRefreshRuntime`
global set up by `react-refresh-runtime.js`. This created two separate
runtime instances: the entry script set up hooks on its bundled copy, while
plugins called `performReactRefresh()` on the window global — a different
instance with no hooks registered.
This splits the development webpack config into two configs so that
`externals` only applies to the entry script. The runtime config bundles
`react-refresh/runtime` and exposes it as `window.ReactRefreshRuntime`,
while the entry config uses that global as an external.
Props manzoorwanijk, wildworks.
See #64393.
git-svn-id: https://develop.svn.wordpress.org/trunk@61543 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 8be3411)
0 commit comments