Newbie trouble with paths after build

Hi,

After having successfully tested the viewer with yarn, I am now trying to build the viewer following the instructions on Build for Production | OHIF. The goal is to deploy the viewer to a Java App Server as a standalone app. For this scenario I don’t want to run the viewer in www-root but in its own subdirectory.

So I changed the configuration in default.js and set routerBasename to "/ohif-viewer’ and rebuild the dist directoy. I can see that the resulting app-config.js contains the changed routerBasename but in the generated index.html all paths are still the same like "/assets/somefile.css. Of course this does not work and results in a lot of 404 errors. What am I missing here, how can I get the correct path into the build output?

Thanks for any pointers,
NL

1 Like

Finally got a working pwa build by setting the path in the PUBLIC_URL environment variable. So, for now the problem is solved.

1 Like

I figured out how to set the PUBLIC_URL environment variable, but the build refuses to load data sources and make the get request to the static wado server hosted by amazon web services.

Any advise is greatly appreciated.

see here Custom URL Access/Build | OHIF