Skip to content

Conversation

@MasonM
Copy link
Member

@MasonM MasonM commented Nov 23, 2025

Fixes #15046

Motivation

#14894 introduced a bug where the ui/dist/app/index.html file generated during production builds has a script tag of the form <script defer="defer" src="/main.<HASH>.js">, whereas it was previously <script defer="defer" src="main.<HASH>.js">.

This is because the production build process that generates ui/dist/app/index.html never has ARGO_BASE_HREF set, so output.publicPath was set to /. The default for that setting is auto (docs).

Modifications

We only need to set publicPath for the development build, so I moved the setting to devServer.devMiddleware.publicPath (docs).

Verification

Tested locally using make start UI=true BASE_HREF=/argo/ and make start UI=true and verifying the workflows page loads in both.
image

Documentation

N/A

argoproj#14894 introduced a bug
where the `ui/dist/app/index.html` file generated during production
builds has a script tag of the form `<script defer="defer"
src="/main.<HASH>.js">`, whereas it was previously `<script
defer="defer" src="main.<HASH>.js">`.

This is because the production build process that generates
`ui/dist/app/index.html` never has `ARGO_BASE_HREF` set, so `output.publicPath`
defaulted to `/` (the previous default was `auto`). We only need to set
`publicPath` for the development build, so I moved the setting to the
`devServer.devMiddleware.publicPath`.

Tested locally using `make start UI=true BASE_HREF=/argo/` and `make
start UI=true` and verifying the workflows page loads in both.

Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
@Joibel Joibel merged commit bee7b14 into argoproj:main Nov 24, 2025
19 checks passed
guanguxiansheng pushed a commit to guanguxiansheng/argo-workflows that referenced this pull request Dec 15, 2025
…argoproj#15066)

Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
@MasonM MasonM added the cherry-pick/3.7 Cherry-pick this to release-3.7 label Jan 3, 2026
argo-cd-cherry-pick-bot bot pushed a commit that referenced this pull request Jan 3, 2026
Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
@argo-cd-cherry-pick-bot
Copy link

🍒 Cherry-pick PR created for 3.7: #15215

MasonM added a commit that referenced this pull request Jan 3, 2026
…-pick #15066 for 3.7) (#15215)

Signed-off-by: Mason Malone <651224+MasonM@users.noreply.github.com>
Co-authored-by: Mason Malone <651224+MasonM@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/3.7 Cherry-pick this to release-3.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI main.js is no longer loaded relative to BASE_HREF on deployed machines since v3.7.4

2 participants