Skip to content

Avoid vercel preset locally to prevent incorrect server index path #148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikolailehbrink
Copy link

This MR ensures the vercelPreset is only applied when building on Vercel. Applying it unconditionally was causing issues with the local build because the preset modifies the server index path.

Specifically, it didn’t align with the local start command:

"start": "react-router-serve ./build/server/index.js"

By conditionally including the preset only when process.env.VERCEL is set, we preserve correct behavior both locally and in the Vercel deployment environment.

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.

1 participant