Skip to content

Configuration for hosting in subfolder #1520

@Noi0103

Description

@Noi0103

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"/>
  1. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions