-
-
Notifications
You must be signed in to change notification settings - Fork 216
fix(react-router-dom-v6): polish react-router-dom #3125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,8 @@ | ||||||
| // biome-ignore lint/suspicious/noTsIgnore: bundleless | ||||||
|
||||||
| // biome-ignore lint/suspicious/noTsIgnore: bundleless | |
| // biome-ignore lint/suspicious/noTsExpectError: bundleless |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a standalone // @ts-expect-error directive followed by a blank line, so it won’t apply to the import below and will likely trigger TypeScript’s “Unused '@ts-expect-error' directive” error. Remove this directive (or move it to directly precede the specific line that errors with no blank line).
| // @ts-expect-error |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,5 @@ | ||||||||||||||
| // @ts-expect-error in v7, StaticRouter is exported from the main entry, but in v6 it's exported from 'react-router-dom/server' | ||||||||||||||
|
||||||||||||||
| // @ts-expect-error in v7, StaticRouter is exported from the main entry, but in v6 it's exported from 'react-router-dom/server' | |
| declare module 'REACT_ROUTER_DOM_SERVER' { | |
| export { StaticRouter } from 'react-router-dom/server'; | |
| } | |
| // Bundler alias for StaticRouter to handle react-router-dom v6/v7 differences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says “we create a shim that re-exports everything from the main entry plus StaticRouter from the server subpath”, but the implementation only creates an alias to
server.mjs(no shim/re-export layer). Either implement the described shim, or update the comment to accurately describe the alias behavior so future readers aren’t misled.