Skip to content

feat: support Vite Env API and React Router 8 - #714

Merged
serhalp merged 11 commits into
mainfrom
serhalp/frb-2257-react-router-8-support
Jun 18, 2026
Merged

feat: support Vite Env API and React Router 8#714
serhalp merged 11 commits into
mainfrom
serhalp/frb-2257-react-router-8-support

Conversation

@serhalp

@serhalp serhalp commented Jun 17, 2026

Copy link
Copy Markdown
Member

Description

React Router 8 has just been released.

React Router 8 makes the Vite Environment API mandatory and supports Vite 7-8. React Router 7 supports Vite 6-7 (and 8, starting with 7.14) but users can opt in to this mode as well via future.v8_viteEnvironmentApi.

Either way, the Vite Env API is forward compatible from the "client" and "ssr" pseudo-environments present previously, and those are backwards compatible as well.

The main change to contend with here is reading from config.environments?.ssr?.build instead of config.ssr.build directly. This is supported by all combinations of versions and flags listed above. Edit: I ended up doing this via the configEnvironment hook, which is equivalent but runs after React Router has actually configured its environments.

We also replace isSsrBuild with a simple applyToEnvironment hook, which is compatible with all these combinations as well.

Finally, this starts reading from rolldownOptions and falling back to rollupOptions. This was entirely optional, but since the latter is soft-deprecated, I introduced this here. Again, all combinations of versions and flags are compatible with this.

Essentially:

       Vite 5    Vite 6   Vite 7   Vite 8
RR7      EOL       ✓        ✓        ✓    (Vite 8 requires RR 7.14.0+)
RR8      EOL       —        ✓        ✓

Now, unfortunately I ended up also needing to somewhat fundamentally rework the whole plugin's approach. The previous approach was to register our own input that wraps the (leakily) expected React Router input. This is now fundamentally incompatible with React Router 8 as soon as a site has any prerendered pages, because React Router 8 uses a separate Vite Environment prerender that it builds by first building the other envs, then starting a preview server, making real HTTP requests to each path to be prerendered, and saving the response to disk. This request was failing, seemingly due to some
assumption in React Router 8 that is not happy with its own entry coexisting with another. Funny enough, I more or less ended up just porting parts of our framework-agnostic plugin here.

The bulk of the diff in this PR is adding two new fixtures for RR8 serverless + RR7 edge, and refactoring the existing test suite to allow running table tests with different versions of Vite. This was important because in testing this locally I contended with all sorts of different behaviours across combinations. This is a bit clunky and will slow down CI but I believe it is worthwhile given all this combinatorial complexity.

Closes #698

Related Tickets & Documents

See also #711 and #712

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for remix-edge ready!

Name Link
🔨 Latest commit 52545a9
🔍 Latest deploy log https://app.netlify.com/projects/remix-edge/deploys/6a3445d84b289b0008cf7f8c
😎 Deploy Preview https://deploy-preview-714--remix-edge.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jun 17, 2026

Copy link
Copy Markdown

Deploy Preview for remix-serverless ready!

Name Link
🔨 Latest commit 52545a9
🔍 Latest deploy log https://app.netlify.com/projects/remix-serverless/deploys/6a3445d8ace5eb00086ca85b
😎 Deploy Preview https://deploy-preview-714--remix-serverless.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f30d0c09-b474-4628-8ec3-b87e1a440cf4

📥 Commits

Reviewing files that changed from the base of the PR and between ef0b876 and 52545a9.

📒 Files selected for processing (1)
  • packages/vite-plugin-react-router/src/plugin.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/vite-plugin-react-router/src/plugin.ts

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features

    • Improved React Router SSR handler generation for edge vs non-edge scenarios, including Hydrogen-aware behavior.
    • Added/extended end-to-end fixtures for React Router v8 with both edge and serverless Netlify setups.
  • Tests

    • Refreshed the e2e test suite structure with reusable, parameterized scenarios.
    • Expanded coverage matrices across multiple React Router and Vite combinations, plus additional route and function fixtures.
  • Chores

    • Updated e2e CI runner platform for ARM execution.
    • Enhanced deployment test tooling to support dependency override injections.

Walkthrough

The PR fixes React Router v8 compatibility by rewriting vite-plugin-react-router to support the Vite Environment API build model. It removes normalizeRollupInput/mergeRollupInput helpers and their tests, introduces findServerEntryFile for dynamic SSR chunk discovery, adds applyToEnvironment to scope the plugin to the ssr environment, and reworks generateNetlifyFunction/generateEdgeFunction with Hydrogen-aware logic. Two new React Router v8 e2e fixture sites are added (edge and serverless), each with complete app shells, route implementations, Netlify function stubs, and project configuration. The e2e infrastructure is extended with a DeployFixtureOptions override mechanism, new fixture declarations for an RR7/RR8×Vite6/7/8 matrix, and parameterized defineOriginSsrTests/defineEdgeSsrTests helpers. The CI runner changes to ubuntu-24.04-arm.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: support Vite Env API and React Router 8' directly and clearly summarizes the main change—adding support for Vite Environment API and React Router 8.
Description check ✅ Passed The description comprehensively explains the PR's purpose, technical changes, and rationale, directly relating to the changeset of supporting Vite Environment API and React Router 8.
Linked Issues check ✅ Passed The PR addresses issue #698 by implementing the required changes to support the Vite Environment API and React Router 8, fixing the server handler generation when the v8_viteEnvironmentApi flag is enabled.
Out of Scope Changes check ✅ Passed All changes are directly aligned with supporting Vite Environment API and React Router 8. Test fixtures, configuration files, and plugin logic changes all serve the stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch serhalp/frb-2257-react-router-8-support

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/vite-plugin-react-router/src/plugin.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

YAMLException: Cannot read config file: /.eslintrc.mjs
Error: end of the stream or a document separator is expected (4:7)

1 | import { overrides } from '@netlify/es ...
2 |
3 | module.exports = {
4 | root: true,
-----------^
5 | extends: ['@netlify/eslint-config-no ...
6 | env: {
at generateError (/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/lib/loader.js:196:10)
at throwError (/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/lib/loader.js:200:9)
at readDocument (/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/lib/loader.js:1720:5)
at loadDocuments (/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/lib/loader.js:1759:5)
at Object.load (/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/lib/loader.js:1783:21)
at loadLegacyConfigFile (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2565:21)
at loadConfigFile (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2680:20)
at ConfigArrayFactory._loadConfigData (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2984:42)
at ConfigArrayFactory.loadFile (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2850:40)
at createCLIConfigArray (/node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3660:35)


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 17, 2026
Comment thread packages/vite-plugin-react-router/src/plugin.ts Outdated
Comment thread packages/vite-plugin-react-router/src/plugin.ts
serhalp added 8 commits June 18, 2026 11:44
React Router 8 makes the Vite Environment API mandatory and supports Vite 7-8. RR7 supports Vite 6-7
but users can opt in to this mode as well via `future.v8_viteEnvironmentApi`.

Either way, the Vite Env API is forward compatible from the "client" and "ssr" pseudo-environments
present previously, and those are backwards compatible as well.

The main change to contend with here is reading from `config.environments?.ssr?.build` instead of
`config.ssr.build` directly. This is supported by all combinations of versions and flags listed
above.

We also replace `isSsrBuild` with a simple `applyToEnvironment` hook, which is compatible with all
these combinations as well.

Finally, this starts reading from `rolldownOptions` and falling back to `rollupOptions`. This was
entirely optional, but since the latter is soft-deprecated, I introduced this here. Again, all
combinations of versions and flags are compatible with this.

```
       Vite 5    Vite 6   Vite 7   Vite 8
RR7      EOL       ✓        ✓        ✓    (Vite 8 requires RR 7.14.0+)
RR8      EOL       —        ✓        ✓
```
It seems setting `resolve.conditions` is just a subset of what `ssr.target: "webworker"` does, so we
still need this.
@serhalp
serhalp force-pushed the serhalp/frb-2257-react-router-8-support branch 2 times, most recently from 4114f7d to 026ae77 Compare June 18, 2026 18:33
serhalp added 2 commits June 18, 2026 14:49
The previous approach was to register our own input that wraps the (leakily) expected React Router
input.

This is now fundamentally incompatible with React Router 8 as soon as a site has any prerendered
pages, because React Router 8 uses a separate Vite Environment `prerender` that it builds by first
building the other envs, then starting a preview server, making real HTTP requests to each path to
be prerendered, and saving the response to disk. This request was failing due to some
assumption in React Router 8 that is not happy with its own entry coexisting with another:
https://github.com/remix-run/react-router/blob/da102b5928d2cf0b94cd0abc2895d0939698e7e9/packages/react-router-dev/vite/plugin.ts#L3578-L3586
@serhalp
serhalp force-pushed the serhalp/frb-2257-react-router-8-support branch from 026ae77 to ef0b876 Compare June 18, 2026 18:53
@serhalp
serhalp marked this pull request as ready for review June 18, 2026 18:59
@serhalp
serhalp requested a review from a team as a code owner June 18, 2026 18:59
Comment thread .github/workflows/e2e.yml
jobs:
e2e:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Tends to be ~30% faster, which is quite helpful for these ~260 e2e tests

/**
* Find React Router's single built server entry chunk and return its on-disk path.
* This assumes that there is exactly one, which we happen to know to be true... except
* when the user uses the `serverBundles` feature, which we do not support.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To be clear, we already didn't support this

return {
name: 'vite-plugin-netlify-react-router',
config(_config, { command, isSsrBuild }) {
applyToEnvironment: (environment) => environment.name === 'ssr',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would have liked to use environment.consumer === 'server' here, but then this runs for RR's prerender environment as well.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef0b876a6f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vite-plugin-react-router/src/plugin.ts
Comment on lines +3 to 4
import { type Fixture } from './support/deploy-to-netlify'
import { expect, test } from './support/fixtures'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

self-nit: re-export this from ./support/fixtures

Suggested change
import { type Fixture } from './support/deploy-to-netlify'
import { expect, test } from './support/fixtures'
import { expect, test, type Fixture } from './support/fixtures'

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/e2e.yml (1)

1-56: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a permissions block to limit GITHUB_TOKEN scope.

The workflow lacks an explicit permissions declaration for the GITHUB_TOKEN, which is a security best practice. This allows the job to use all available GitHub API permissions by default.

🔐 Proposed fix to add a minimal permissions block
  e2e:
+   permissions:
+     contents: read
    runs-on: ubuntu-24.04-arm

Adjust the contents: read scope as needed based on what this workflow actually requires (e.g., if it pushes artifacts or comments, expand accordingly).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/e2e.yml around lines 1 - 56, Add an explicit permissions
block to the e2e workflow to limit the scope of the GITHUB_TOKEN for security
purposes. Insert a permissions section at the job level (under the e2e job,
before the runs-on declaration) or at the workflow level (after the on section).
Set the permissions to the minimum required by the workflow, starting with
contents: read, and expand the scope only if the workflow requires additional
permissions such as pushing artifacts, writing comments, or other GitHub API
operations.

Source: Linters/SAST tools

🧹 Nitpick comments (1)
packages/vite-plugin-react-router/src/plugin.test.ts (1)

6-9: ⚡ Quick win

Strengthen this test to validate plugin contract, not just object-ness.

toBeInstanceOf(Object) is too broad and won’t catch regressions in required hooks introduced by this rewrite. Assert the key plugin fields/hooks explicitly.

Proposed test improvement
 import { expect, it } from 'vitest'
-import { Plugin } from 'vite'
 
 import { netlifyPlugin } from './plugin.js'
 
 it('exports a Vite plugin factory', () => {
   const plugin = netlifyPlugin()
-  expect(plugin).toBeInstanceOf(Object)
+  expect(plugin).toMatchObject({
+    name: 'vite-plugin-netlify-react-router',
+  })
+  expect(plugin.applyToEnvironment).toBeTypeOf('function')
+  expect(plugin.writeBundle).toBeTypeOf('function')
 })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/vite-plugin-react-router/src/plugin.test.ts` around lines 6 - 9, The
test for netlifyPlugin() in the 'exports a Vite plugin factory' test case is too
generic by only asserting that the result is an instance of Object. Replace this
broad check with explicit assertions that validate the plugin implements the
required Vite plugin contract by checking for the specific hooks and fields
expected from a Vite plugin (such as name, apply, and other required plugin
methods/properties). This will catch regressions if the plugin structure changes
and doesn't include essential Vite plugin hooks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/e2e/fixtures/react-router-edge-site-v8/app/app.css`:
- Around line 1-3: The `@tailwind` directives in the app.css file are triggering
the scss/at-rule-no-unknown stylelint rule. Add a local stylelint suppression
comment above the three `@tailwind` at-rules (base, components, and utilities) to
suppress this specific rule for these lines, allowing the fixture to use
Tailwind's standard directives without lint errors flagging them.

In `@tests/e2e/fixtures/react-router-serverless-site-v8/app/app.css`:
- Around line 1-3: The `@tailwind` directives in app.css are being flagged as
unknown at-rules by Stylelint. Fix this by updating the Stylelint configuration
file to recognize Tailwind at-rules by adding a rule that allows them (such as
configuring allowedAtRules or installing a Tailwind-specific Stylelint plugin).
If modifying the global config is not preferred, alternatively add a local /*
stylelint-disable-line at-rule-no-unknown */ comment above each of the three
`@tailwind` directives (base, components, utilities) in the CSS file to suppress
the warning for this fixture.

In `@tests/e2e/react-router-user-journeys.spec.ts`:
- Around line 238-309: The test suite is missing coverage for the React Router 7
with Vite 8 combination. Add two new test.describe blocks following the existing
pattern: one for 'origin SSR (React Router 7, Vite 8)' that calls
defineOriginSsrTests with the reactRouterServerlessSiteRR7Vite8 fixture (insert
between the RR7 Vite 7 and RR8 Vite 7 origin SSR test blocks), and another for
'edge SSR (React Router 7, Vite 8)' that calls defineEdgeSsrTests with the
reactRouterEdgeSiteRR7Vite8 fixture (insert between the RR7 Vite 7 and RR8 Vite
7 edge SSR test blocks). Each block should follow the same pattern as the
surrounding test suites by wrapping the fixture parameter passed to the callback
function.

---

Outside diff comments:
In @.github/workflows/e2e.yml:
- Around line 1-56: Add an explicit permissions block to the e2e workflow to
limit the scope of the GITHUB_TOKEN for security purposes. Insert a permissions
section at the job level (under the e2e job, before the runs-on declaration) or
at the workflow level (after the on section). Set the permissions to the minimum
required by the workflow, starting with contents: read, and expand the scope
only if the workflow requires additional permissions such as pushing artifacts,
writing comments, or other GitHub API operations.

---

Nitpick comments:
In `@packages/vite-plugin-react-router/src/plugin.test.ts`:
- Around line 6-9: The test for netlifyPlugin() in the 'exports a Vite plugin
factory' test case is too generic by only asserting that the result is an
instance of Object. Replace this broad check with explicit assertions that
validate the plugin implements the required Vite plugin contract by checking for
the specific hooks and fields expected from a Vite plugin (such as name, apply,
and other required plugin methods/properties). This will catch regressions if
the plugin structure changes and doesn't include essential Vite plugin hooks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7edbbde-23fa-403f-88e6-cd2873c4fa83

📥 Commits

Reviewing files that changed from the base of the PR and between 1dece2c and ef0b876.

⛔ Files ignored due to path filters (8)
  • tests/e2e/fixtures/react-router-edge-site-v8/app/welcome/logo-dark.svg is excluded by !**/*.svg
  • tests/e2e/fixtures/react-router-edge-site-v8/app/welcome/logo-light.svg is excluded by !**/*.svg
  • tests/e2e/fixtures/react-router-edge-site-v8/public/camel.jpg is excluded by !**/*.jpg
  • tests/e2e/fixtures/react-router-edge-site-v8/public/favicon.ico is excluded by !**/*.ico
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/welcome/logo-dark.svg is excluded by !**/*.svg
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/welcome/logo-light.svg is excluded by !**/*.svg
  • tests/e2e/fixtures/react-router-serverless-site-v8/public/camel.jpg is excluded by !**/*.jpg
  • tests/e2e/fixtures/react-router-serverless-site-v8/public/favicon.ico is excluded by !**/*.ico
📒 Files selected for processing (53)
  • .github/workflows/e2e.yml
  • packages/vite-plugin-react-router/src/lib/rollup.test.ts
  • packages/vite-plugin-react-router/src/lib/rollup.ts
  • packages/vite-plugin-react-router/src/plugin.test.ts
  • packages/vite-plugin-react-router/src/plugin.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/app/app.css
  • tests/e2e/fixtures/react-router-edge-site-v8/app/entry.server.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/root.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/about.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/blobs.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/cacheable.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/context.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/headers.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/home.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/images.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/middleware-header.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/routes/prerendered.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/app/welcome/welcome.tsx
  • tests/e2e/fixtures/react-router-edge-site-v8/netlify.toml
  • tests/e2e/fixtures/react-router-edge-site-v8/netlify/edge-functions/middleware-header.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/netlify/edge-functions/pong.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/netlify/functions/blorble.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/package.json
  • tests/e2e/fixtures/react-router-edge-site-v8/react-router.config.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/tailwind.config.ts
  • tests/e2e/fixtures/react-router-edge-site-v8/tsconfig.json
  • tests/e2e/fixtures/react-router-edge-site-v8/vite.config.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/app.css
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/root.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/about.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/blobs.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/cacheable.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/context.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/headers.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/home.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/images.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/middleware-header.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/routes/prerendered.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/app/welcome/welcome.tsx
  • tests/e2e/fixtures/react-router-serverless-site-v8/netlify.toml
  • tests/e2e/fixtures/react-router-serverless-site-v8/netlify/edge-functions/middleware-header.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/netlify/edge-functions/pong.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/netlify/functions/blorble.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/package.json
  • tests/e2e/fixtures/react-router-serverless-site-v8/react-router.config.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/tailwind.config.ts
  • tests/e2e/fixtures/react-router-serverless-site-v8/tsconfig.json
  • tests/e2e/fixtures/react-router-serverless-site-v8/vite.config.ts
  • tests/e2e/react-router-user-journeys.spec.ts
  • tests/e2e/support/deploy-to-netlify.ts
  • tests/e2e/support/fixtures.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)
💤 Files with no reviewable changes (2)
  • packages/vite-plugin-react-router/src/lib/rollup.test.ts
  • packages/vite-plugin-react-router/src/lib/rollup.ts

Comment thread tests/e2e/fixtures/react-router-edge-site-v8/app/app.css
Comment thread tests/e2e/fixtures/react-router-serverless-site-v8/app/app.css
Comment thread tests/e2e/react-router-user-journeys.spec.ts
@serhalp
serhalp merged commit eeb3a82 into main Jun 18, 2026
23 of 25 checks passed
@serhalp
serhalp deleted the serhalp/frb-2257-react-router-8-support branch June 18, 2026 20:02
serhalp pushed a commit that referenced this pull request Jun 18, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>vite-plugin-react-router: 4.0.0</summary>

##
[4.0.0](vite-plugin-react-router-v3.1.1...vite-plugin-react-router-v4.0.0)
(2026-06-18)


### ⚠ BREAKING CHANGES

* publish ESM only, remove CJS build
([#713](#713))
* require vite 6+, node.js 22.22+
([#712](#712))

### Features

* publish ESM only, remove CJS build
([#713](#713))
([1dece2c](1dece2c))
* require vite 6+, node.js 22.22+
([#712](#712))
([a99b5c4](a99b5c4))
* support Vite Env API and React Router 8
([#714](#714))
([eeb3a82](eeb3a82))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature code contributing to the implementation of a feature and/or user facing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting Vite Environment API future flag in react-router config prevents react-router server handler from being generated

2 participants