| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
react-router-dom has no v8 — the package was removed and everything it exported moved into react-router. Extract the shared names into ReactRouterDomExports and spread them into both presets, so the react-router preset now also covers Link, NavLink, Navigate, Outlet, Route, Routes, useSearchParams and useLinkClickHandler. BREAKING CHANGE: those names are not on react-router's main entry in v6 or v7, so the react-router preset now generates imports that do not resolve for consumers still on those majors. They should use the react-router-dom preset, whose contents are unchanged. Migrates the vite-react example onto react-router v8 accordingly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
|
Sorry, something went wrong.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sorry, something went wrong.
npm i https://pkg.pr.new/unplugin-auto-import@625 commit: da057ee |
Sorry, something went wrong.
The preset stays and its resolved list is unchanged, so v6 and v7 users keep working. The tag records that the package is gone in v8 and points at the react-router preset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
Why
react-router-dom has no v8 — the package was removed in that major and everything it exported moved into react-router itself. The react-router preset only lists the v6 hooks, so on v8 it no longer covers the components and hooks users actually need.
Split out of the dependency-update sweep on main because it is a breaking change to a shipped preset.
What
Extracts the names that used to be react-router-dom-only into ReactRouterDomExports and spreads them into both presets. The react-router preset now also covers:
Link · NavLink · Navigate · Outlet · Route · Routes · useSearchParams · useLinkClickHandler
BrowserRouter / HashRouter / MemoryRouter stay commented out, as before — they are called once and are not a good fit for auto-import.
The vite-react example is migrated onto react-router v8: react-router-dom dropped from its dependencies, BrowserRouter imported from react-router, and the preset name updated in its vite.config.ts.
The react-router-dom preset is kept
It is not removed, and its resolved import list is byte-identical to before — only its construction changed, so it now shares the two extracted arrays. v6 and v7 users who use that preset are unaffected.
It carries a @deprecated tag recording that the package is gone in v8 and pointing at the react-router preset. Note this is source-level documentation: presets are bundled internals, so the tag does not reach the published .d.mts, and the public PresetName string union cannot carry per-member deprecation. README already points readers at src/presets directly.
⚠️ Breaking
The react-router preset's output is unconditional — it always returns the v8 list. Those names are not on react-router's main entry in v6 or v7, so consumers on those majors who use the react-router preset will get generated imports that do not resolve.
Migration: switch to the react-router-dom preset, which is unchanged.
This was a deliberate choice over making react-router a version-aware function preset (which the codebase supports — see @vueuse/core): keeping the output static means preset results stay predictable and independent of install state.
Verification
build, typecheck, lint and all 41 tests pass. Every example and the playground build, including tsc && vite build for vite-react.
🤖 Generated with Claude Code