Skip to content

studio-lagier/sample-wordpress-CRA-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demonstration of how to use wordpress-shortcode-webpack-plugin with Create React App, using react-app-rewired to extend the CRA webpack config.

How I got here:

  1. npx create-react-app my-plugin
  2. cd my-plugin
  3. yarn add -D react-app-rewired wordpress-shortcode-webpack-plugin
  4. Created config-overrides.js adding the webpack plugin.
  5. Updated package.json to use react-app-rewired instead of react-scripts.
  6. (Bonus) Updated base URL to be correctly pathed for Wordpress by setting "homepage": "/wp-content/plugins/my-plugin/assets/" in package.json.
  7. Run yarn build. Done!

About

A demo CRA app integrating wordpress-shortcode-webpack-plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published