Skip to content

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.

@itsjavi
Copy link

itsjavi commented Aug 2, 2025

I'd rather run locally the same code as in production as much as possible, that's why I took a different approach in my PR, by trying to find the server output file:

#152

Or have you found other issues with vercel builds running locally?

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