I currently have multiple react based apps. I am trying to put a gateway in front of them so I have have www.url.com/one point to one app, www.url.com/two point to another. I can build the apps and deploy them individually no problem, but when I put a gateway in front of them to set up path based routing the react app can't find the css or js it generates.
I have tried to add a path to the "homepage" setting in my package.json and that changed the relative path in the code but the page still couldn't find the css/js files. Then I realized I probably had to open up a rule so I could route to them, but when I do that I get the error "Uncaught SyntaxError: Unexpected token '<'", and when I look I see that my app for some reason doesn't add the type to the script reference tag it generates, it looks like this:
The rules for one app in my gateway look like this:
lists /lists lispool shhttpset
staticjs /lists/static/js/* lispool shhttpset
staticcss /lists/static/css/* lispool shhttpset
At this point I'm not sure what to try. I can see that react is generating files that it expects to be at the same URL, when I add a gateway in front of that with a path it gets really confused. I am open to using a CDN for these files or something else if there is a better architecture. Does anyone know how to make this work? Thanks in advance.