Conversation
|
@heteibako is attempting to deploy a commit to the Aaron Pettengill's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi! Thanks for putting time into this. Sorry I didn't get to this sooner -- it would have been much easier to merge this PR quickly if it focused only on the peer dependency bump itself rather than migrating everything else. I'm not able to merge this yet because it looks like the docs deployment from this PR hits an internal server error: In the meantime, I published a release of @rvf/react-router to get the react-router v8 support out. But I'll be happy to merge this if everything is working. |
Widen the @rvf/react-router peer dependency to "^7.5.3 || ^8.0.0" so the package works with both v7 and v8. No library source changes are needed — RVF only uses stable react-router APIs. Package: - Add "moduleResolution": "bundler" to the package tsconfig so the tsup DTS build can resolve v8's ESM-only conditional exports. Example apps (test-app, docs) moved fully to v8: - Bump react-router / @react-router/* to ^8.0.0, Vite to ^7, Node to >=22. - Migrate entry.server.tsx from the removed AppLoadContext type to RouterContextProvider. - Migrate docs getLoadContext to the v8 RouterContextProvider/createContext context API. - Annotate the docs Vite config return type and cast the postcss plugins to work around a type mismatch (tailwindcss/autoprefixer resolve a different postcss copy than the one Vite bundles). Monorepo: - Bump root Vite to ^7 (hoisted @react-router/dev@8 resolves the root Vite; Vite 5 crashed with a __config_loader error) and Node engine to >=22. - Add a custom jsdom test environment that bridges AbortSignals across the Node/jsdom boundary. v8 attaches an AbortSignal to every submission Request, which undici rejects under jsdom. - Note: the test runner stays on Vite 5 — vitest@1 pins vite@^5, so it resolves a nested copy. App builds use Vite 7; moving the test toolchain to Vite 7 would require bumping vitest to 3.x (out of scope here). Verification: @rvf/react-router typechecks against react-router 8.1.0 and the full test suite passes (392 tests) under the new jsdom environment.
React Router 8 reads the SSR entry from environments.ssr.build.rollupOptions.input instead of build.rollupOptions.input, so server/app.ts was silently dropped and build/server/index.js shipped the raw server build with no default export. Vercel's Node launcher rejected it at runtime. Also bump the function runtime to nodejs22.x to match the app's engines field.
7f554b5 to
615b749
Compare
Thanks — and fair point on scope. I've rebased onto main so the peer-dep bump is dropped; this PR is now just the docs/test-app migration to v8. Found the deploy failure: React Router 8 reads the custom server entry from environments.ssr.build.rollupOptions.input instead of build.rollupOptions.input, so server/app.ts was silently ignored and build/server/index.js shipped the raw server build with no default export — hence Vercel's launcher rejecting it. Fixed in the config; the built function now default-exports the Express app as expected. |
Widen the @rvf/react-router peer dependency to "^7.5.3 || ^8.0.0" so the package works with both v7 and v8. No library source changes are needed — RVF only uses stable react-router APIs.
Package:
Example apps (test-app, docs) moved fully to v8:
Monorepo:
Verification: @rvf/react-router typechecks against react-router 8.1.0 and the full test suite passes (392 tests) under the new jsdom environment.