image path changes, for dev setup, needs testing on 'prod' #1

Closed
nathan wants to merge 3 commits from image-path-changes into lotus
Member

Test this with your prod build to make sure it didnt break anything there

Test this with your prod build to make sure it didnt break anything there
nathan added 1 commit 2026-08-02 17:37:58 -04:00
image path changes, for dev setup, needs testing on 'prod'
CI / Trigger Desktop Build (pull_request) Skipped
CI / Build & Quality Checks (pull_request) Failing after 6m0s
2bbd390a3b
nathan added 1 commit 2026-08-02 18:42:41 -04:00
fixed retarded linter problem
CI / Trigger Desktop Build (pull_request) Skipped
CI / Build & Quality Checks (pull_request) Failing after 6m2s
b2376513fd
nathan added 1 commit 2026-08-02 19:01:11 -04:00
fixed retarded prettier 'error'
CI / Trigger Desktop Build (pull_request) Skipped
CI / Build & Quality Checks (pull_request) Successful in 10m45s
0aef410f60
Owner

Re-reviewed at the current head (0aef410f) — thanks for cleaning up the formatting/lint in the last two commits; prettier and eslint both pass on the changed files now. 👍

One substantive blocker remains: it still 404s the logo + favicon in production.

The URLs resolve to the site root (/Lotus.png, /lotus.png, …), but the build sets copyPublicDir: false, so Vite never emits publicDir into dist/ — the logos reach dist/ only via vite-plugin-static-copy,
which lands them at dist/public/res/. I verified with an actual build of this branch's config: dist/Lotus.png (and the three favicons) are absent → 404, while dist/public/res/Lotus.png exists. Dev works
only because publicDir: './public/res' serves that folder at the root in the dev server — that remap doesn't exist in the built output.

Fix: point the paths at /public/res/… and revert the vite.config.js change (leave publicDir: false). Resolves in both dev and prod with no config change:

const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png');

(Keeping publicDir: './public/res' would also require copyPublicDir: true, which double-copies all of public/res — android/apple/svg, ~560K — into the dist root when only the 4 logos are used there. Not
recommended.)

Heads-up: lotus already shipped this exact fix in f12e05c5 using /public/res/…, so closing/rebasing may be simpler than reworking.

Re-reviewed at the current head (0aef410f) — thanks for cleaning up the formatting/lint in the last two commits; prettier and eslint both pass on the changed files now. 👍 One substantive blocker remains: it still 404s the logo + favicon in production. The URLs resolve to the site root (/Lotus.png, /lotus.png, …), but the build sets copyPublicDir: false, so Vite never emits publicDir into dist/ — the logos reach dist/ only via vite-plugin-static-copy, which lands them at dist/public/res/. I verified with an actual build of this branch's config: dist/Lotus.png (and the three favicons) are absent → 404, while dist/public/res/Lotus.png exists. Dev works only because publicDir: './public/res' serves that folder at the root in the dev server — that remap doesn't exist in the built output. Fix: point the paths at /public/res/… and revert the vite.config.js change (leave publicDir: false). Resolves in both dev and prod with no config change: const LotusLogo = withOriginBaseUrl(getOriginBaseUrl(), '/public/res/Lotus.png'); (Keeping publicDir: './public/res' would also require copyPublicDir: true, which double-copies all of public/res — android/apple/svg, ~560K — into the dist root when only the 4 logos are used there. Not recommended.) Heads-up: lotus already shipped this exact fix in f12e05c5 using /public/res/…, so closing/rebasing may be simpler than reworking.
jared requested review from jared 2026-08-02 19:45:48 -04:00
Owner

Closing this in favor of the version now on lotus (f2c356f2) — I took your approach here (the withOriginBaseUrl(getOriginBaseUrl(), …) helper) and landed it there, co-authored to you. 🙌

The only change from this PR: the paths point at /public/res/… instead of the site root, and vite.config.js stays publicDir: false. Reason — the prod build sets copyPublicDir: false, so a root /Lotus.png
404s in production (the logos are emitted to dist/public/res/ by vite-plugin-static-copy); verified with a build. Same helper, same idea, just the prod-safe path.

Thanks for chasing the root cause here — the public/ import diagnosis was spot on. Closing as merged-in-spirit.

Closing this in favor of the version now on lotus (f2c356f2) — I took your approach here (the withOriginBaseUrl(getOriginBaseUrl(), …) helper) and landed it there, co-authored to you. 🙌 The only change from this PR: the paths point at /public/res/… instead of the site root, and vite.config.js stays publicDir: false. Reason — the prod build sets copyPublicDir: false, so a root /Lotus.png 404s in production (the logos are emitted to dist/public/res/ by vite-plugin-static-copy); verified with a build. Same helper, same idea, just the prod-safe path. Thanks for chasing the root cause here — the public/ import diagnosis was spot on. Closing as merged-in-spirit.
jared closed this pull request 2026-08-02 20:26:02 -04:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#1