An example plugin demonstrating how to use React's hot module replacement when developing a Gutenberg block. No more death by a thousand cuts reloads. Your command + R keys will thank you.
- Define the
WP_LOCAL_DEV
constant in your development environment npm install
: Install plugin dependencies via npmnpm run dev
: Development without hot module replacement, you'll need to reload the page after every changenpm run hot
: Development with hot module replacementnpm run build
: To build the block for use on a production server: