This WordPress plugin demonstrates how to setup a plugin that uses React and ES6 in a WordPress plugin.
- Make sure that you have Node.js installed.
- Navigate to the plugin directory, install
npm
dependencies, and run the dev build command:
cd /path/to/wordpress/wp-content/plugins/wp-react-boilerplate
npm install
npm run dev
npm install
- Install dependencies
npm run build
– Generate production versions of static assets.
npm run dev
- Start webpack in "watch" mode so that the assets are automatically compiled when a file changes.