Skip to content

feat(perf): update deps#836

Merged
tannerlinsley merged 3 commits intomainfrom
shim-migration
Apr 20, 2026
Merged

feat(perf): update deps#836
tannerlinsley merged 3 commits intomainfrom
shim-migration

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented Apr 19, 2026

Test plan

  • pnpm dev — homepage renders, no console errors
  • pnpm build — completes, inspect dist/ bundle sizes
  • pnpm start:prod — production server renders homepage
  • pnpm test:smoke — all 4 routes green (already verified in pre-commit)
  • Visual smoke-check: navbar, docs pages, npm-stats chart, RSC islands
  • Netlify preview deploy: verify SSR + hydration + streaming Suspense

Summary by CodeRabbit

  • Chores
    • Added a development plugin to the build pipeline to improve local dev tooling and faster iteration.
    • Adjusted dependency pre-bundling to avoid inconsistent optimization and reduce build surprises.
    • Updated linting to disable nested config resolution and expanded ignore patterns to exclude additional temp/metadata directories.
    • Added a new dev dependency to support the updated tooling and plugin.

Drop-in React-compatible shim (~9-10KB gzipped) replacing react / react-dom /
react-dom/server via the @tanstack/dom-vite Vite plugin. Installing just
@tanstack/dom-vite pulls the full set (dom-core, scheduler, react, react-dom,
react-dom-server) transitively.

Build-size win: app-shell + react gzip 160KB → 116KB (-44KB).
Mobile Lighthouse: slight improvement (-128ms FCP, -27ms TBT).
Desktop Lighthouse: parity with baseline.

Also:
- oxlint: ignore .claude/, disable nested config discovery so stale agent
  worktrees with their own oxlintrc copies don't break lint.
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 19, 2026

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 9771d0d
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/69e5ca2b3a57af00086ea68d
😎 Deploy Preview https://deploy-preview-836--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 37 (🔴 down 18 from production)
Accessibility: 90 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 97 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

Added the TanStack DOM Vite plugin and serverVariant aliases, excluded lucide-react from Vite pre-bundling, updated the lint script to disable nested oxlint configs, and extended oxlint ignore patterns to include .claude. No runtime code or public API changes.

Changes

Cohort / File(s) Summary
Linting config
\.oxlintrc.json, package.json
Added .claude to oxlint ignorePatterns; updated lint script to run oxlint --type-aware --disable-nested-config.
Vite config & deps
vite.config.ts, package.json
Added tanstackDom() plugin to Vite plugins; added resolver aliases mapping runtime react-dom/server.* and react-dom/static.* to @tanstack/react-dom-server; added lucide-react to optimizeDeps.exclude; introduced @tanstack/dom-vite@0.1.0-alpha.4 as a devDependency.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hop through configs, quietly bold,
TanStack plugin tucked in, a story told,
.claude hid away from oxlint's sight,
lucide skips the prebundle night,
A small patch danced — neat and bright.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'feat(perf): update deps' is vague and does not accurately reflect the main change, which is replacing React with a @tanstack/dom-vite shim for significant performance improvements. Update the title to clearly indicate the primary change, such as 'feat(perf): replace React with @tanstack/dom-vite shim' or similar, to accurately represent the substantial architectural shift.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 shim-migration

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

Brings in raw REACT_LAZY_TYPE child handling in both SSR (walkNode) and
client (pushChildren). RSC Flight serializes 'use client' components —
CodeBlock, CodeBlockView, CodeExplorer, etc. — as bare lazy objects
directly in the tree (not wrapped in REACT_ELEMENT_TYPE). The previous
shim dropped those silently, so code snippets disappeared on docs pages
(e.g. /virtual/latest/docs/introduction).
Copy link
Copy Markdown

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 125: The dependency entry "@tanstack/dom-vite": "0.1.0-alpha.3" is
invalid (package/version not published) and will break installs; remove or
replace it in package.json and update any imports accordingly — either change
the dependency to a published package/version or delete the entry and then
remove or adjust the import of tanstackDom in vite.config.ts (the import
statement referencing `@tanstack/dom-vite`) so the build uses a correct package
name or no import at all.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: afede75b-8f27-455a-8631-d01234c36ab4

📥 Commits

Reviewing files that changed from the base of the PR and between 3e36a90 and 8a00018.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Comment thread package.json Outdated
"@playwright/test": "^1.59.0",
"@shikijs/transformers": "^4.0.2",
"@tanstack/devtools-vite": "^0.6.0",
"@tanstack/dom-vite": "0.1.0-alpha.3",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Is @tanstack/dom-vite@0.1.0-alpha.3 published on npm, and what changed from 0.1.0-alpha.2 (especially SSR/client handling of raw REACT_LAZY_TYPE children)?

💡 Result:

No, @tanstack/dom-vite@0.1.0-alpha.3 is not published on npm. Extensive searches across npm registry, TanStack repositories, GitHub, and related TanStack Vite plugins (like @tanstack/devtools-vite, @tanstack/vite-config, @tanstack/start-vite-plugin) returned no evidence of this package or version existing. No changelog or mentions of changes from alpha.2 to alpha.3, including SSR/client handling of REACT_LAZY_TYPE children, were found. The package name may be a misremembered or unpublished/internal TanStack project.

Citations:


🏁 Script executed:

# Find vite.config file and check its imports
fd -e ts -e js -e mts -e mjs "vite.config" | head -5

Repository: TanStack/tanstack.com

Length of output: 79


🏁 Script executed:

# Also search for any references to `@tanstack/dom-vite` in the codebase
rg "@tanstack/dom-vite" --type ts --type js

Repository: TanStack/tanstack.com

Length of output: 128


🏁 Script executed:

cat -n vite.config.ts | head -30

Repository: TanStack/tanstack.com

Length of output: 1513


Remove non-existent package dependency

Line 125 adds @tanstack/dom-vite@0.1.0-alpha.3, but this package and version do not exist on npm. While vite.config.ts imports tanstackDom from @tanstack/dom-vite (line 3), the specified version is not published. Adding this to package.json will cause npm install to fail. Either use a published version of this package, find the correct package name, or remove the dependency if it's not needed for this build.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 125, The dependency entry "@tanstack/dom-vite":
"0.1.0-alpha.3" is invalid (package/version not published) and will break
installs; remove or replace it in package.json and update any imports
accordingly — either change the dependency to a published package/version or
delete the entry and then remove or adjust the import of tanstackDom in
vite.config.ts (the import statement referencing `@tanstack/dom-vite`) so the
build uses a correct package name or no import at all.

…ic server variants

Pulls in the shell-chunk batching perf fix landed in the shim's
react-dom-server (0.1.0-alpha.4 vs. alpha.3 before).

Adds manual top-level aliases for `react-dom/server.{edge,node,bun,
browser}` and `react-dom/static.*` → `@tanstack/react-dom-server`. The
shim ships a single universal server build; React splits per runtime
and @vitejs/plugin-rsc / the Netlify edge adapter import those
per-runtime specifiers conditionally. Vite 8's EnvironmentResolveOptions
doesn't accept `alias`, so these have to live at top-level resolve.alias.

Home route verified rendering cleanly via SSR with no console errors.
@tannerlinsley tannerlinsley changed the title feat(perf): swap React for @tanstack/dom-vite shim feat(perf): update deps Apr 20, 2026
@tannerlinsley tannerlinsley merged commit c21f505 into main Apr 20, 2026
8 checks passed
@tannerlinsley tannerlinsley deleted the shim-migration branch April 20, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant