Skip to content

fix: add .env.production to bake correct /xm-player/ base path into builds#255

Merged
ford442 merged 1 commit into
mainfrom
claude/tender-goldberg-6ykxh
Jun 5, 2026
Merged

fix: add .env.production to bake correct /xm-player/ base path into builds#255
ford442 merged 1 commit into
mainfrom
claude/tender-goldberg-6ykxh

Conversation

@ford442
Copy link
Copy Markdown
Owner

@ford442 ford442 commented Jun 5, 2026

Summary

  • Adds .env.production with VITE_APP_BASE_PATH=/xm-player/
  • Vite automatically loads this file during npm run build, so import.meta.env.BASE_URL is correctly baked in as /xm-player/ without needing to manually prefix the env var every time
  • Without this, BASE_URL defaults to /, causing all asset fetches (shaders, worklets, .mod files) to 404 on the subdirectory deployment at test.1ink.us/xm-player/

Root cause

The build was run as plain npm run build instead of VITE_APP_BASE_PATH=/xm-player/ npm run build. The deploy.py script documents the correct command but it was easy to miss. This commit makes the correct base path automatic for all production builds.

Test plan

  • Run npm run build (no env prefix needed now)
  • Check that bundled JS references /xm-player/ asset paths
  • Deploy and confirm shaders, worklets, and default .mod load without 404s

https://claude.ai/code/session_0139136nD9YdA7A578NW1ZsC


Generated by Claude Code

Summary by CodeRabbit

  • Chores
    • Updated production environment configuration to specify the correct base path for application deployment and resource access.

…base path

Without VITE_APP_BASE_PATH set at build time, import.meta.env.BASE_URL
bakes in as "/" instead of "/xm-player/", causing all asset requests
(shaders, worklets, mod files) to 404 on the subdirectory deployment.

https://claude.ai/code/session_0139136nD9YdA7A578NW1ZsC
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Lost in the diff? Review this PR in Change Stack to follow the change map from intent to exact ranges.

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 720bf386-3477-42d2-a178-eb10d6449895

📥 Commits

Reviewing files that changed from the base of the PR and between 0cbef45 and 24257d7.

📒 Files selected for processing (1)
  • .env.production

📝 Walkthrough

Walkthrough

The .env.production file now explicitly configures the Vite application base path to /xm-player/, setting the production deployment URL prefix for the mod-player application.

Changes

Production Base Path Configuration

Layer / File(s) Summary
Production app base path setting
.env.production
VITE_APP_BASE_PATH environment variable is set to /xm-player/ for production builds.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~1 minute

Poem

🐰 A path is set, so plain and clear,
/xm-player/ declares right here,
The production stage now knows its place,
With base path routing, apps embrace! 🎵

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/tender-goldberg-6ykxh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ford442 ford442 marked this pull request as ready for review June 5, 2026 22:42
@ford442 ford442 merged commit 6886f9e into main Jun 5, 2026
3 checks passed
@ford442 ford442 deleted the claude/tender-goldberg-6ykxh branch June 5, 2026 22:42
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.

2 participants