Skip to content

Tanstack: Optimize tanstack react-store#34731

Merged
huang-julien merged 1 commit into
nextfrom
fix/tanstack_deps_optimize
May 7, 2026
Merged

Tanstack: Optimize tanstack react-store#34731
huang-julien merged 1 commit into
nextfrom
fix/tanstack_deps_optimize

Conversation

@huang-julien
Copy link
Copy Markdown
Contributor

@huang-julien huang-julien commented May 6, 2026

Closes #

What I did

Add tanstack react state to the optimizeDeps list.
This should fix the issue with storybook not loading for tanstack router SPA

cc @kylegach

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  • npx @tanstack/cli create --router-only
  • npm create storybook@10.2
  • npx storybook@0.0.0-pr-34718-sha-1881de66 upgrade
    • replac the vrsion b thee canary bellow

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-34731-sha-64cea9fe. Try it out in a new sandbox by running npx storybook@0.0.0-pr-34731-sha-64cea9fe sandbox or in an existing project with npx storybook@0.0.0-pr-34731-sha-64cea9fe upgrade.

More information
Published version 0.0.0-pr-34731-sha-64cea9fe
Triggered by @huang-julien
Repository storybookjs/storybook
Branch fix/tanstack_deps_optimize
Commit 64cea9fe
Datetime Wed May 6 16:38:40 UTC 2026 (1778085520)
Workflow run 25448329633

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=34731

Summary by CodeRabbit

  • New Features
    • Enhanced Vite optimization configuration for the TanStack React preset, improving build performance with optimized dependency handling for TanStack store and router integration.

@huang-julien huang-julien requested a review from kylegach May 6, 2026 16:37
@huang-julien huang-julien enabled auto-merge May 6, 2026 16:38
@huang-julien huang-julien changed the title Tanstack: optimize react-store Tanstack: Optimize tanstack react-store May 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

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: db4a4196-284b-4747-93bc-8709315779f7

📥 Commits

Reviewing files that changed from the base of the PR and between e4ac3cc and 64cea9f.

📒 Files selected for processing (1)
  • code/frameworks/tanstack-react/src/preset.ts

📝 Walkthrough

Walkthrough

Adds a new exported constant optimizeViteDeps to the TanStack React preset that enumerates three dependencies for Vite optimization, including TanStack store and router packages plus an external-store shim. No functional behavior changes.

Changes

Vite Dependencies Configuration

Layer / File(s) Summary
Vite Optimization Configuration
code/frameworks/tanstack-react/src/preset.ts
New exported optimizeViteDeps constant lists three dependencies (TanStack store, router, and external-store shim) for Vite dependency optimization.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@huang-julien huang-julien merged commit 44386f8 into next May 7, 2026
144 of 149 checks passed
@huang-julien huang-julien deleted the fix/tanstack_deps_optimize branch May 7, 2026 07:12
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.

2 participants