Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration for hosting in subfolder #1520

Open
Noi0103 opened this issue Aug 29, 2024 · 0 comments
Open

Configuration for hosting in subfolder #1520

Noi0103 opened this issue Aug 29, 2024 · 0 comments

Comments

@Noi0103
Copy link

Noi0103 commented Aug 29, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant