-
Notifications
You must be signed in to change notification settings - Fork 46
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
Conversation
Just tested this out on my website, and unless I am missing something, it works as expected. Massive improvement! |
Awesome! Thanks so much @jacobparis
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 |
} | ||
: undefined, | ||
}, | ||
export default defineConfig(({ command }) => ({ | ||
ssr: { | ||
noExternal: command === "build" ? true : undefined, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still necessary?
There was a problem hiding this comment.
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
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 |
@jacobparis I mean node_modules size. They include huge ts-morph. |
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.