Skip to content

Move theme-init.js to assets/#3176

Merged
david-crespo merged 2 commits intomainfrom
move-theme-init-js
Apr 9, 2026
Merged

Move theme-init.js to assets/#3176
david-crespo merged 2 commits intomainfrom
move-theme-init-js

Conversation

@david-crespo
Copy link
Copy Markdown
Collaborator

Closes #3175

theme-init.js was in public/ at the root, so it ended up at dist/theme-init.js. In production, Nexus serves console static files via explicitly defined routes — there's a /assets/{path:.*} route but no route for files at the root like /theme-init.js.

The fix moves theme-init.js from public/ to public/assets/ so it lands in dist/assets/ and is served by the existing /assets/{path:.*} route. The Vite plugin now references /assets/theme-init.js?v={hash}.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Apr 9, 2026 2:55pm

Request Review

@david-crespo
Copy link
Copy Markdown
Collaborator Author

david-crespo commented Apr 9, 2026

Added a simple safety test that would have caught this. Here it is failing on main.

Screenshot 2026-04-09 at 9 52 11 AM

Had a very nice CC experience where I asked it to make Vite work like the prod server (only serving assets/* and index.html) and it was like "sure, but it would be a lot simpler to just make sure there's nothing in public/ that's not supposed to be there." I might still do the dev server thing, testing it now.

Screenshot 2026-04-09 at 9 53 03 AM

@david-crespo david-crespo merged commit 0df8ff0 into main Apr 9, 2026
7 checks passed
@david-crespo david-crespo deleted the move-theme-init-js branch April 9, 2026 15:23
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

Successfully merging this pull request may close these issues.

theme-init.js 404s in production, causing dark theme flash

1 participant