I know this issue has been discussed before, but all solutions i have found are from years ago, and do not work.
What i need to do, is to load some config fields from a JSON file, sitting in the public directory of my React app. Just a static asset, outside of the build process
When i try fetching it using AJAX, i get an error on an "Unexpected token ':'". My config.json file looks simply like this:
{
"name": "yoyo"
}
It's located in the public directory of a create-react-app program. Is there any way this can be done?
Edit: everything is working, i just had some stupid mistake