Viewing 1 replies (of 1 total)
  • Plugin Author rockiger

    (@rockiger)

    ReactPress doesn’t work this way. You can’t just add a build React app. You need to build it with ReactPress. That is the whole idea behind ReactPress.

    Having said that you could try the following:

    Assuming you are using create-react-app changing your package.json like this and rebuilding should work:

    "build": "PUBLIC_URL=/wp-content/reactpress/apps/[appname]/build react-scripts build",

    If this doesn’t work please stick to the prescribed workflow:

    1. Install ReactPress on your local WordPress installation
    2. Use create-react-app from the command line in the apps folder shown in ReactPress

    3. Reload ReactPress page and give the app a slug
    4. Develop your React app

    5. Build the app
    6. Install ReactPress on live WordPress site
    7. Create the same folder there (no need for create-react-app) there
    8. Upload the build folder of your React app into the created folder.
      Reload ReactPress page and give the app the SAME slug.

    Hope this helps.

Viewing 1 replies (of 1 total)

The topic ‘doesnt load assets and css’ is closed to new replies.