My react-app does not render
Hello,My react-app does not render in the browser when I access it from an app server, so I hope to get some help with it.
Below is the info I hope is needed to understand the structure.
I run a weblogic server 14.1
I deploy a ear with several war-files
Inside the ear I got a angular-app and a react-app in individual war-files.
I build the wars and the ear with maven.
For the ear I add the wars like:
<webModule>
<groupId>weblogic-ejb-project</groupId>
<artifactId>weblogic-angular-client</artifactId>
<bundleFileName>weblogic-angular-client.war</bundleFileName>
<contextRoot>angular</contextRoot>
</webModule>
<webModule>
<groupId>weblogic-ejb-project</groupId>
<artifactId>weblogic-react-client</artifactId>
<bundleFileName>weblogic-react-client.war</bundleFileName>
<contextRoot>react</contextRoot>
</webModule>
The angular-app renders when I access it from the browser (http://127.0.1.1:7001/weblogic-angular-client/)
But not the react-app (http://127.0.1.1:7001/weblogic-react-client/), just a blank page. How ever the view-source shows the content from index.html like:
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.a083f8ba.js"></script><link href="/static/css/main.073c9b0a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
...so it looks like the react-app is present with the content from index.html
Do you guys see anything missing for the react-app?
Best regards
Fredrik
PS1 it does render if i run npm start and access it from localhost:3000, so it does work that way.
PS2 I have also checked that main.a083f8ba.js is in the correct folder and can be accessed from http://127.0.1.1:7001/weblogic-react-client/static/js/main.a083f8ba.js
PS3 I have tried with the same result from Firefox, Chromium on Linux and Chrome from an old Android-phone
A picture of the ear and the war files might be found here:
https://pasteboard.co/ILitJ3ykxbqm.png