Skip to content

Conversation

@brenelz
Copy link
Contributor

@brenelz brenelz commented Oct 27, 2025

Fixes #5472

Summary by CodeRabbit

  • New Features

    • Added React framework support to the basic static example project.
  • Chores

    • Enhanced dependency optimization for server-side rendering scenarios.
    • Updated optional peer dependency configuration for improved cross-framework compatibility.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR addresses rendering issues in the start-basic-static examples by adding the React Vite plugin to the React example's configuration, excluding the static server functions package from dependency optimization in both react-start and solid-start Vite plugins, and declaring optional peer dependencies for framework packages in the start-static-server-functions package.

Changes

Cohort / File(s) Summary
React example configuration
examples/react/start-basic-static/package.json, examples/react/start-basic-static/vite.config.ts
Added @vitejs/plugin-react v5.1.0 dependency and integrated the React plugin into the Vite configuration.
Vite plugin dependency optimization
packages/react-start/src/plugin/vite.ts, packages/solid-start/src/plugin/vite.ts
Extended the optimizeDeps.exclude list to include @tanstack/start-static-server-functions on the server environment to prevent dependency discovery.
Static server functions package metadata
packages/start-static-server-functions/package.json
Added peerDependencies declarations for @tanstack/react-start and @tanstack/solid-start as optional workspace peers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Specific attention areas:
    • Verify that excluding @tanstack/start-static-server-functions from dependency optimization doesn't impact runtime behavior in both React and Solid environments
    • Confirm that marking the framework start packages as optional peer dependencies is appropriate for the static server functions module (no version mismatch issues)
    • Validate that the React plugin version (^5.1.0) is compatible with the project's Vite and React versions

Possibly related PRs

  • TanStack/router#5223: Modifies optimizeDeps configuration in react-start and solid-start Vite plugins to add entries, complementing this PR's updates to the exclude list.

Suggested reviewers

  • lachlancollins

Poem

🐰 A blank page blues were troubling the day,
So we added React plugins to fix the display,
Dependencies excluded with careful care,
Now static server functions flow everywhere,
Pages render bright—no more despair!

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix static server functions" is directly related to the main objectives and changes in the changeset. The PR targets the static-server-functions package and related packages (react-start, solid-start) with modifications to vite configurations, peer dependencies, and dependency overrides. While the title is somewhat concise and doesn't specify the exact nature of the fix (dependency management, vite optimization exclusions, peer dependencies), it accurately reflects the primary focus area and intent of the changes. The title clearly conveys what component is being addressed without being misleading or off-topic.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad0e702 and 5632c0f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • packages/react-start/src/plugin/vite.ts (1 hunks)
  • packages/solid-start/src/plugin/vite.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nx-cloud
Copy link

nx-cloud bot commented Oct 27, 2025

View your CI Pipeline Execution ↗ for commit 5632c0f

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 5m 35s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-27 23:03:42 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 27, 2025

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5650

@tanstack/directive-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5650

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5650

@tanstack/history

npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5650

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5650

@tanstack/react-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5650

@tanstack/react-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5650

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5650

@tanstack/react-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5650

@tanstack/react-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5650

@tanstack/react-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5650

@tanstack/router-cli

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5650

@tanstack/router-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5650

@tanstack/router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5650

@tanstack/router-devtools-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5650

@tanstack/router-generator

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5650

@tanstack/router-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5650

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5650

@tanstack/router-utils

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5650

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5650

@tanstack/server-functions-plugin

npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5650

@tanstack/solid-router

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5650

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5650

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5650

@tanstack/solid-start

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5650

@tanstack/solid-start-client

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5650

@tanstack/solid-start-server

npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5650

@tanstack/start-client-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5650

@tanstack/start-plugin-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5650

@tanstack/start-server-core

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5650

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5650

@tanstack/start-storage-context

npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5650

@tanstack/valibot-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5650

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5650

@tanstack/zod-adapter

npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5650

commit: 5632c0f

@brenelz
Copy link
Contributor Author

brenelz commented Oct 27, 2025

Didn't seem to fix the issue. Tested by installing the pkg.new

@brenelz brenelz closed this Oct 27, 2025
@brenelz brenelz reopened this Oct 27, 2025
@brenelz brenelz closed this Oct 27, 2025
@brenelz brenelz changed the title WIP: fix static server functions fix static server functions Oct 27, 2025
@brenelz brenelz marked this pull request as ready for review October 27, 2025 22:01
@brenelz brenelz marked this pull request as draft October 27, 2025 22:09
@brenelz brenelz marked this pull request as ready for review October 27, 2025 23:05
@schiller-manuel schiller-manuel changed the title fix static server functions fix: fix static server functions Oct 27, 2025
@schiller-manuel schiller-manuel merged commit 1bf65ac into TanStack:main Oct 27, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

start-basic-static example renders blank pages

2 participants