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
Even though we're using Gulp, Webpack is used under the hood for both the blocks and scripts tasks. It isn't immediately clear to me how the block-editor-hmr package is linked; there's a root hmr.js file that requires it, and the built-in HotModuleReplacementPlugin is added to the Webpack config. Maybe that's all that is required, but the block-editor-hmr package seems to have some unique requirements that certain things are exported from each block script, which looks like an old way of handling blocks all from one central entrypoint. It also hasn't seen an update published to npm for 3 years (though it looks like there is more recent activity in the repo), which could explain the outdated approach.
The text was updated successfully, but these errors were encountered:
The Human Made Webpack Helpers package includes hot module reloading for blocks. Digging into the code, it looks like this is provided by the block-editor-hmr package.
Even though we're using Gulp, Webpack is used under the hood for both the
blocks
andscripts
tasks. It isn't immediately clear to me how the block-editor-hmr package is linked; there's a roothmr.js
file that requires it, and the built-inHotModuleReplacementPlugin
is added to the Webpack config. Maybe that's all that is required, but theblock-editor-hmr
package seems to have some unique requirements that certain things are exported from each block script, which looks like an old way of handling blocks all from one central entrypoint. It also hasn't seen an update published to npm for 3 years (though it looks like there is more recent activity in the repo), which could explain the outdated approach.The text was updated successfully, but these errors were encountered: