devloco / create-react-wptheme

Create modern, React-enabled WordPress themes with a single command.
MIT License
359 stars 60 forks source link

Non-Local Wordpress getting 404 on bundle.js for generated theme #8

Closed semaurer closed 5 years ago

semaurer commented 5 years ago

This is more of a question than an issue, not sure how else to contact you.

This is working perfectly on my local Wordpress. When I transfer the theme to my actual wordpress account and activate the theme, the index file gets a 404 on "theme"/static/js/bundle.js. When I SSH into my box, I can see that the bundle.js file is there even though it's getting a 404.

Do the WPBuild and WPstart commands have to be run on the particular box it's running on? Or could you export the entire theme and expect it to work out of the box?

Thanks.

devloco commented 5 years ago

No worries, just based on a guess here, but I'm guessing your root path on your dev machine is different than on the prod machine.

Check out this section of the README on how to set root before running wpbuild:

Build Configuration

semaurer commented 5 years ago

That's definitely it. Thanks a bunch.