Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barryceelen/wp-gutenberg-hot-module-replacement
An example plugin demonstrating how to use React's hot module replacement while developing a Gutenberg block.
https://github.com/barryceelen/wp-gutenberg-hot-module-replacement
gutenberg-blocks wordpress
Last synced: about 1 month ago
JSON representation
An example plugin demonstrating how to use React's hot module replacement while developing a Gutenberg block.
- Host: GitHub
- URL: https://github.com/barryceelen/wp-gutenberg-hot-module-replacement
- Owner: barryceelen
- Created: 2018-10-26T07:20:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T22:50:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T10:22:13.820Z (about 2 months ago)
- Topics: gutenberg-blocks, wordpress
- Language: JavaScript
- Homepage:
- Size: 666 KB
- Stars: 2
- Watchers: 1
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# WordPress Gutenberg Hot Module Replacement Example
An example plugin demonstrating how to use React's [hot module replacement](https://webpack.js.org/concepts/hot-module-replacement/) when developing a Gutenberg block. No more death by a thousand ~~cuts~~ reloads. Your command + R keys will thank you.
## Install dependencies and run build script
1. Define the `WP_LOCAL_DEV` constant in your development environment
1. `npm install`: Install plugin dependencies via npm
1. `npm run dev`: Development without hot module replacement, you'll need to reload the page after every change
1. `npm run hot`: Development with hot module replacement
1. `npm run build`: To build the block for use on a production server: