Building A Wordpress Theme With ReactJSPublished: 31-Oct-2018
I've recently embarked on a journey involving building a WordPress theme with ReactJS.
I've discovered that I need:
- an index.php file
- a styles.css file
I'm hosting locally on a LAMPP stack, but my build environment is create-react-app. I currently manage environment settings for local and production. I am thinking though that I need to create an intermediate environment for the LAMPP stack testing area.
I am also using the 'homepage' variable inside my package.json file to manage subfolders. I've had to use this for my LAMPP stack test site. My production site will not require a subfolder.
My main problem currently is that on build (to the 'production' environment - which, incidentally is truthfully my test environment), the font-awesome WOFF files are being incorrectly referenced path-wise. Everything else, including my BrowserRouter, is working correctly. All of the other icon and style sheets are working fine.
Anyone got any tips on how to solve my WOFF file problem?