Skip to content

Proof of concept WordPress plugin to submit posts from the front end using the WordPress REST API and React

Notifications You must be signed in to change notification settings

jimfrenette/wp-api-react-poc

Repository files navigation

wp-api-react-poc

Proof of concept WordPress plugin to submit posts from the front end using the WordPress REST API and React


webpack

@wordpress/scripts

This script uses webpack behind the scenes. It’ll look for a webpack config in the top-level directory of your package and will use it if it finds one. If none is found, it’ll use the default config provided by @wordpress/scripts packages. Learn more in the Advanced Usage section.

Our webpack config, webpack.config.js makes React and ReactDOM available outside of the bundle to prevent import errors when using 3rd party React libs.

const defaults = require("@wordpress/scripts/config/webpack.config");

module.exports = {
  ...defaults,
  externals: {
    "react": "React",
    "react-dom": "ReactDOM"
  }
};
# install dependencies
npm install

# build for dev with watch
npm start

# build for production with minification
npm run build

About

Proof of concept WordPress plugin to submit posts from the front end using the WordPress REST API and React

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published