Skip to content

A WordPress plugin demonstrating block and plugin auto-loading with hot module replacement.

License

Notifications You must be signed in to change notification settings

farmerau/wp-block-hmr-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress Editor Block Auto-Loading and Hot-Reloading Demo

This project demonstrates how we can use require.context to automatically detect and register WordPress editor blocks and block editor plugins while still supporting hot module replacement..

Usage

After running npm install, these key commands will let you test the plugin locally:

  • npm start: Run the Webpack development server. WordPress will automatically detect and load the script from the dev server based on the presence of the asset-manifest.json the dev server outputs into the build directory. Hot reloading is only provided while the dev server is running.
  • npm run build: Build the application into the build/ directory.

License

This plugin is free software; you can redistribute it and/or modify it under the terms of either:

About

A WordPress plugin demonstrating block and plugin auto-loading with hot module replacement.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.9%
  • PHP 37.1%