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

Block dev & hot module reloading #36

Open
cr0ybot opened this issue Mar 22, 2023 · 0 comments
Open

Block dev & hot module reloading #36

cr0ybot opened this issue Mar 22, 2023 · 0 comments
Assignees

Comments

@cr0ybot
Copy link
Owner

cr0ybot commented Mar 22, 2023

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 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.

@cr0ybot cr0ybot self-assigned this Mar 22, 2023
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

No branches or pull requests

1 participant