remix
remix copied to clipboard
support `getLoadContext` when using Vite
- Similar the the Cloudflare preset maintained by remix team, it would be great if the vercelPreset could also accept the
getLoadContextfunction so that the all loaders can get that context.
I don't care how it's implemented, I just need to be able to define my loader context somewhere and use it in a vercel app.
Did you have a particular use case that you need it for? See https://github.com/vercel/remix/issues/92 for a previous time when this was brought up.
I'm migrating an existing codebase (~80 routes) and they are all setup to pull resources (like database client, environment variables) from the loader context. We did this, in theory, to make our app more portable across all runtimes/environments. Ironically, its now the only thing preventing us from using vercel.
If you could show me where this change would live... I'd be happy to send you a PR.
Same situation here, very desperate
Same issue here, we have shared context, and currently we need to make multiple API calls per session to retrieve that context (config related).
@TooTallNate any plans on supporting Hydrogen Vite? I know that getLoadContext is already supported in a classic Remix app, but it would be great to also be able to deploy Hydrogen Vite to Vercel.