How to pickup staticwebapp.config.json in my react build? #1175
-
I am working on a SWA, but can't seem to get my 'staticwebapp.config.json' to work! According to the docs this should be located in the same location as 'app_location', which I currently have set to my 'frontend' folder. What am I missing here? I have the following directory structure: Static-Web-Project My workflow file is as follows:
My 'staticwebapp.config.json' file content:
When I commit to the main branch of my repo, the actions run, but nothing seems to be happening with my config. I need to redirect all requests to index.html. Any help would be greatly appreciated, this issue is beginning to make me miserable and holding up proceedings! Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Can you provide a repo so we can check it out? Your folder structure seems good, as this is what we have in our template:https://github.com/staticwebdev/react-basic/blob/main/staticwebapp.config.json (not that react-basic is equivalent to your 'frontend' folder) |
Beta Was this translation helpful? Give feedback.
Hi @jay-cascade It seems like there's a blank space at the end of the file name for staticwebapp.config.json in your repo. https://github.com/HydraDataSystems/recruitment-static-web-app/blob/main/frontend/staticwebapp.config.json%20 is loading the file, but https://github.com/HydraDataSystems/recruitment-static-web-app/blob/main/frontend/staticwebapp.config.json says file not found.
Can you please check if this is causing any issue here?