mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #132] [MERGED] fix: add missing react-server-dom-webpack to App Router examples #339
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/132
Author: @gentritbiba
Created: 2/26/2026
Status: ✅ Merged
Merged: 2/27/2026
Merged by: @FredKSchott
Base:
main← Head:fix/examples-add-react-server-dom-webpack📝 Commits (1)
c7d236efix: add missing react-server-dom-webpack to App Router examples📊 Changes
6 files changed (+20 additions, -0 deletions)
View changed files
📝
examples/app-router-cloudflare/package.json(+1 -0)📝
examples/app-router-playground/package.json(+1 -0)📝
examples/benchmarks/package.json(+1 -0)📝
examples/hackernews/package.json(+1 -0)📝
examples/nextra-docs-template/package.json(+1 -0)📝
pnpm-lock.yaml(+15 -0)📄 Description
Summary
react-server-dom-webpackas an explicit dependency to all App Router examples that were missing it:app-router-cloudflare,app-router-playground,benchmarks,hackernews,nextra-docs-template"use client"components rendered as static HTML with no interactivityCloses #28
Root Cause
@vitejs/plugin-rsccorrectly addsreact-server-dom-webpack/client.browsertooptimizeDeps.includefor the client environment, but pnpm's strict module resolution prevents Vite from resolving it unless the package is explicitly listed in the project'spackage.json. This caused:The CJS file was served raw to the browser, resulting in
ReferenceError: module is not defined, which broke React's RSC client integration and all hydration.Test plan
examples/app-router-cloudflarewithvite devFailed to resolve dependencywarnings in consoleReferenceError: module is not definedin browser console"use client"Counter component increments on click🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.