Skip to content
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

use vercel preset #82

Merged
merged 4 commits into from
Feb 7, 2025
Merged

Conversation

jacobparis
Copy link
Contributor

@jacobparis jacobparis commented Feb 6, 2025

The vercel template seems to be broken on Vercel's end for a lot of people – even old versions of the template don't seem to be deploying anymore

notable threads with the same issue

Vercel now has an official react router preset, probably not technically released yet since it's not in any changelogs anywhere and Nate has recent commits writing tests for it, but it's up on npm and that's good enough for me

This approach seems to lose the power to pass AppLoadContext from the server unless there's a sneakier way of getting that info I'm not aware of (maybe through the entry.server.ts file?). Either way, when people install the default vercel template they expect it to work, and this approach is simpler. Possibly we could have a second template for vercel-express that gives the lower level control, if we can get that working again.

@mobregozo
Copy link

Just tested this out on my website, and unless I am missing something, it works as expected. Massive improvement!
It's way easier than having a custom build.

@brookslybrand brookslybrand self-requested a review February 6, 2025 22:15
@brookslybrand
Copy link
Contributor

Awesome! Thanks so much @jacobparis

Possibly we could have a second template for vercel-express that gives the lower level control, if we can get that working again.

Yep, I agree. This is a better option for now. I opened up #83 as a reminder to add back into the custom server on Vercel

@brookslybrand brookslybrand merged commit 4c84712 into remix-run:main Feb 7, 2025
4 checks passed
This was referenced Feb 7, 2025
}
: undefined,
},
export default defineConfig(({ command }) => ({
ssr: {
noExternal: command === "build" ? true : undefined,
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure if it's necessary, I wasn't quite sure what it was for in the first place so I've left it alone

@TrySound
Copy link

TrySound commented Feb 8, 2025

FYI this plugin alone is 20MB on disk

@jacobparis
Copy link
Contributor Author

FYI this plugin alone is 20MB on disk

That doesn't sound right, getting less than a kilobyte here https://bundlephobia.com/package/@vercel/[email protected]

you can view the plugin source here https://github.com/vercel/vercel/tree/main/packages/react-router

@TrySound
Copy link

TrySound commented Feb 8, 2025

@jacobparis I mean node_modules size. They include huge ts-morph.

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.

5 participants