Skip to content
Source
Sign inSign up
TanStack/router

fix(router-devtools-core): bundle solid for smaller package #5406

Mergedbenmccann(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5406/headmerged by birkskyum(GitHub profile, opens in a new tab)

Trying https://github.com/TanStack/router/pull/5374 again

However, this time I followed the manual testing instructions detailed in https://github.com/TanStack/router/pull/5374#issuecomment-3378827140, so I'm fairly confident this version shouldn't break anything

Summary by CodeRabbit

  • Chores

    • Adjusted development dependencies to streamline tooling; no runtime impact.
  • Build

    • Updated build configuration to produce a more consistent output and simplify packaging.
    • Improved stability of the build by refining how bundles are generated.
    • No changes to the public API or end-user functionality.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: router-devtools-core

    2. View your CI Pipeline Execution ↗ for commit ebe58cb6b20a8b50b55215c7d4b102a84e8f057c

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded3m 38sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1sView ↗

      ☁️ Nx Cloud last updated this comment at 2025-10-08 16:10:52 UTC

    3. Walkthrough

      The PR moves solid-js from dependencies to devDependencies in packages/router-devtools-core/package.json and refactors packages/router-devtools-core/vite.config.ts to assign the merged config to a constant, set rollup output options (manualChunks and preserveModules to false), and export the constant as the default.

      Changes

      Cohort / File(s)Summary of Changes
      Dependency adjustments
      packages/router-devtools-core/package.json
      Moved "solid-js" from dependencies to devDependencies; no changes to peerDependencies.
      Vite config refactor and rollup options
      packages/router-devtools-core/vite.config.ts
      Introduced const merged = mergeConfig(...); set merged.build.rollupOptions.output.manualChunks = false and preserveModules = false; changed default export from inline mergeConfig(...) call to exporting merged.

      Sequence Diagram(s)

      (no diagram)

      Estimated code review effort

      🎯 2 (Simple) | ⏱️ ~10 minutes

      • TanStack/router#5403 — Also alters packages/router-devtools-core dependencies around "solid-js" and adjusts exports, directly overlapping with this change.
      • TanStack/router#5374 — Moves "solid-js" out of runtime deps and tweaks build/bundling for the same package, closely related.

      Poem

      A hop, a bop, I tweak my deps with glee, Rollup rolls simpler, chunks set free. Dev-only carrots in my toolkit stash, Exports tidied—no extra flash. Thump-thump! Config merged, ears high— Ship the build, then off I fly. 🥕🐇

      Pre-merge checks and finishing touches

      ✅ Passed checks (3 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title Check✅ PassedThe title “fix(router-devtools-core): bundle solid for smaller package” succinctly describes the main change of bundling Solid into the build to reduce the published package size, which aligns with the dependency and Vite configuration updates in the PR.
      Docstring Coverage✅ PassedNo functions found in the changes. Docstring coverage check skipped.
      ✨ Finishing touches
      • 📝 Generate docstrings
        🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Post copyable unit tests in a comment

      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.
    4. More templates

      @tanstack/arktype-adapter

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

      @tanstack/directive-functions-plugin

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

      @tanstack/eslint-plugin-router

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/server-functions-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/zod-adapter

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

      commit: ebe58cb

    5. 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 e0c63d47b4d6891bb186c16ece27bd452a37406b and ebe58cb6b20a8b50b55215c7d4b102a84e8f057c.

      ⛔ Files ignored due to path filters (1)
      • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
      📒 Files selected for processing (2)
      • packages/router-devtools-core/package.json (1 hunks)
      • packages/router-devtools-core/vite.config.ts (1 hunks)
      🧰 Additional context used
      📓 Path-based instructions (2)
      **/package.json

      📄 CodeRabbit inference engine (AGENTS.md)

      Use workspace:* protocol for internal dependencies in package.json files

      Files:

      • packages/router-devtools-core/package.json
      **/*.{ts,tsx}

      📄 CodeRabbit inference engine (AGENTS.md)

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

      Files:

      • packages/router-devtools-core/vite.config.ts
      🧠 Learnings (2)
      📓 Common learnings
      Learnt from: CR
      PR: TanStack/router#0
      File: AGENTS.md:0-0
      Timestamp: 2025-09-23T17:36:12.598Z
      Learning: Applies to packages/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/
      📚 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/{router-devtools,*-router-devtools}/** : Keep router devtools packages in packages/router-devtools/ and packages/*-router-devtools/

      Applied to files:

      • packages/router-devtools-core/package.json
      ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
      • GitHub Check: Test
      🔇 Additional comments (2)
      packages/router-devtools-core/vite.config.ts (1)

      10-21: Refactoring approach is appropriate for bundling configuration.

      Extracting the merged configuration to a constant before export is a clean approach that allows you to modify the Rollup options. Setting manualChunks = false and preserveModules = false is correct for bundling solid-js into the package (as per the PR objectives).

      However, ensure that the property access is safe (see previous comment about type guards).

      packages/router-devtools-core/package.json (1)

      70-70: Re-run build with dependencies installed and confirm solid-js is bundled. In packages/router-devtools-core, run pnpm install then pnpm run build, verify dist exists, confirm no external solid-js imports (e.g. rg -n "from ['\"]solid-js['\"]" dist/), and check package size reduction.

      Resolvedby benmccann(GitHub profile, opens in a new tab)
    6. birkskyum(GitHub profile, opens in a new tab) approved these changes

Sign in to join this conversation.