Skip to content

Conversation

@dario-piotrowicz
Copy link

@dario-piotrowicz dario-piotrowicz commented Sep 29, 2025

The Cloudflare Vite plugin doesn't support optimising the @tanstack/readt-devtools package causing Tanstack start app to error during development (here's a simple example: https://github.com/dario-piotrowicz/tanstack-start-cf-test where @tanstack/readt-devtools has been directly excluded from the deps optimization, including it causes vite dev not to work anymore: https://github.com/dario-piotrowicz/tanstack-start-cf-test).

The changes here are therefore adding the package to the optimizeDeps.exclude array, making sure that Tanstack apps can compatible with the Cloudflare plugin.

Summary by CodeRabbit

  • Bug Fixes

    • Improved development stability by preventing bundler optimization of additional developer tools, reducing dev server crashes and hot-reload issues in environments like Cloudflare.
  • Chores

    • Updated plugin build configuration to exclude one more developer tool from optimization for better compatibility during local development.
    • No changes to application functionality or public APIs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

The Vite plugin for React Start adds @tanstack/react-devtools to optimizeDeps.exclude, alongside existing exclusions; an inline comment notes Cloudflare plugin compatibility. No other logic, exports, or control-flow changes.

Changes

Cohort / File(s) Summary
Vite plugin config
packages/react-start/src/plugin/vite.ts
Added @tanstack/react-devtools to optimizeDeps.exclude; updated inline comment about Cloudflare compatibility. No other changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

I nibble configs, hop and preen,
Exclude a devtool, swift and clean.
Vite now knows just what to do—
Cloudy paths stay clear and true.
Thump-thump! My review is neat. 🐇✨

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 title precisely conveys the primary change by stating that the @tanstack/react-devtools package is being added to the optimizeDeps.exclude array for the React Start Vite plugin option, matching the pull request’s core modification. It is concise and focused on the essential update without unnecessary detail, making the intent clear to reviewers scanning the history. The use of an imperative verb (“add”) and the “fix” prefix appropriately signals both the action and the nature of the change. This aligns well with best practices for descriptive, actionable pull request titles.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 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 a6e4831 and a6a7bd8.

📒 Files selected for processing (1)
  • packages/react-start/src/plugin/vite.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/react-start/src/plugin/vite.ts
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/react-start/src/plugin/vite.ts
🧠 Learnings (1)
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • packages/react-start/src/plugin/vite.ts
🔇 Additional comments (2)
packages/react-start/src/plugin/vite.ts (2)

58-59: PR title contains a typo.

The PR title has @tanstack/readt-devtools but should be @tanstack/react-devtools to match the actual package name in the code.

Note: This issue was already flagged in a previous review.


58-59: Exclusion of @tanstack/react-devtools is correct

Verified the package exists on npm and is imported in example React apps; no further changes required.


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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 581941a and a6e4831.

📒 Files selected for processing (1)
  • packages/react-start/src/plugin/vite.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript in strict mode with extensive type safety across the codebase

Files:

  • packages/react-start/src/plugin/vite.ts
packages/{*-start,start-*}/**

📄 CodeRabbit inference engine (AGENTS.md)

Name and place Start framework packages under packages/-start/ or packages/start-/

Files:

  • packages/react-start/src/plugin/vite.ts
🧠 Learnings (1)
📚 Learning: 2025-09-23T17:36:12.598Z
Learnt from: CR
PR: TanStack/router#0
File: AGENTS.md:0-0
Timestamp: 2025-09-23T17:36:12.598Z
Learning: Applies to packages/{react-router,solid-router}/** : Implement React and Solid bindings/components only in packages/react-router/ and packages/solid-router/

Applied to files:

  • packages/react-start/src/plugin/vite.ts

@dario-piotrowicz dario-piotrowicz changed the title fix: add @tanstack/readt-devtools to optimizeDeps.exclude for react-start vite pluging option fix: add @tanstack/react-devtools to optimizeDeps.exclude for react-start vite pluging option Sep 29, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/optimizedeps-exclude-react-devtools branch from a6e4831 to a6a7bd8 Compare September 29, 2025 22:06
@nx-cloud
Copy link

nx-cloud bot commented Sep 30, 2025

View your CI Pipeline Execution ↗ for commit a6a7bd8

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

☁️ Nx Cloud last updated this comment at 2025-09-30 20:49:28 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 30, 2025

More templates

@tanstack/arktype-adapter

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

@tanstack/directive-functions-plugin

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

@tanstack/eslint-plugin-router

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/server-functions-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/zod-adapter

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

commit: a6a7bd8

@dario-piotrowicz dario-piotrowicz marked this pull request as draft September 30, 2025 22:53
@dario-piotrowicz
Copy link
Author

Closing since the proper fix seems to instead be TanStack/devtools#192

@dario-piotrowicz dario-piotrowicz deleted the dario/optimizedeps-exclude-react-devtools branch October 1, 2025 10:26
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.

1 participant