WP Manifestindependent plugin directory
manifest / editor / wpe-plans-block

React App

Loading a dynamic react frontend

by WPE Team · github.com/ajcastiglione/wpe-plans-block

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/ajcastiglione/wpe-plans-block/archive/refs/heads/master.zip

Gutenberg with custom react app

How it works

  • Create a webpack.config.js file and extend the default config to add a new entry point: client: './src/client.js'
  • Inside blocks.json, specify the new client script using the keyword: "script" and point to output of the build file: "file:./build/client.js"
  • The new client.js file must live within the src folder
  • The frontend react app can live within the src directory and structured as you see fit