create-react-wptheme
create-react-wptheme copied to clipboard
Warn Users After Running `wpbuild` That Theme Will Look Broken on Dev Server
If a user's dev server and prod server use differing paths for the root URL (a common setup) this can get confusing. Here's what happens:
- The user ran
npm run startand made some changes to their theme. - When they're done dev'ing, they run
npm run buildto make a production ready version of the theme. - If they refresh their browser (currently pointed at their dev instance) the browser will show a "missing stylesheet" error.
It'd be nice to warn them that this is expected behavior.
- Themes built using
npm run startwill be broken on a production server. - Themes built using
npm run buildwill be broken on a dev server.