A WordPress plugin demonstrating block and plugin auto-loading with hot module replacement.
OTHER License
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..
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.This plugin is free software; you can redistribute it and/or modify it under the terms of either: