Skip to content

chore: conditionalize MFE config behind DEMO env var#1463

Merged
jeremyphilemon merged 4 commits intodemofrom
conditionalize-mfe
Mar 20, 2026
Merged

chore: conditionalize MFE config behind DEMO env var#1463
jeremyphilemon merged 4 commits intodemofrom
conditionalize-mfe

Conversation

@jeremyphilemon
Copy link
Copy Markdown
Collaborator

Summary

  • Makes basePath and assetPrefix in next.config.ts conditional on DEMO env var so a single branch works as both the forkable template (no base path) and the demo deployment (/demo subpath)
  • Removes the hardcoded //demo redirect from vercel.json — the demo Vercel project should configure this in project settings instead
  • All ~30 NEXT_PUBLIC_BASE_PATH references throughout the codebase already use ?? "" fallback, so they work correctly in both modes with no changes

Context

This is prep for collapsing demo and main into a single branch. After merging, the demo deployment just needs DEMO=true in its Vercel project env vars.

Test plan

  • Deploy with DEMO=true — confirm app mounts at /demo subpath with asset prefix
  • Deploy without DEMO — confirm app works at root with no base path
  • Add //demo redirect in Vercel project settings for the demo deployment

Makes basePath and assetPrefix conditional on DEMO env var so a single
branch can serve both the forkable template (no base path) and the
demo deployment (mounted at /demo subpath). Removes the hardcoded
redirect from vercel.json — the demo project should configure this
in Vercel project settings instead.
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 20, 2026

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

Project Deployment Actions Updated (UTC)
ai-chatbot Ready Ready Preview, Comment Mar 20, 2026 10:17am
chatbot Ready Ready Preview, Comment Mar 20, 2026 10:17am

Request Review

@jeremyphilemon jeremyphilemon merged commit 691c3cb into demo Mar 20, 2026
6 checks passed
@jeremyphilemon jeremyphilemon deleted the conditionalize-mfe branch March 20, 2026 10:21
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