Ontotext-AD / graphdb-workbench

The web application for GraphDB APIs
Other
45 stars 16 forks source link

Configuration for hosting in subfolder #1520

Open Noi0103 opened 2 months ago

Noi0103 commented 2 months ago

intention

I have a Fork with some UI adjustments to show uuids that I want to host in a subfolder.

expected behaviour

The weppack configuration with a different Subfolder is used.

actual behaviour

The Configuration fixed not all of the links. Some requests still use "/" instead of the provided output.publicPath.

reproduce

  1. added output.publicPath: '/my/subfolder/' to webpack.config.prod.js
  2. npm run build
  3. docker buildx build the nginx image with webapp
  4. integrate in my Environment

Now it mostly works but some ressources are still not found due to a wrong requested path (ignoring my base path according to browser dev tools).

  1. using grep -r "base href" i found this:

    ./dist/index.html:    <base href="/" target="_blank"/>
  2. replaced the base href path in ./dist/index.html "/" with "/my/subfolder/"

Since this base path is used in ./src/template.html I assume this is a second place where I'd have to set the subfolder:

./src/template.html:    <base href="/" target="_blank"/>

Since this is the same configuration done in two places I want to ask: Is this intended behaviour?