Skip to content
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

Fix react-router-dom/server index.ts import from pnpm migration #11514

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/little-ghosts-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router-dom": patch
---

Change the `react-router-dom/server` import back to `react-router-dom` instead of `index.ts`
4 changes: 2 additions & 2 deletions packages/react-router-dom/server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import type {
Location,
RouteObject,
To,
} from "./index";
} from "react-router-dom";
import {
createPath,
parsePath,
Expand All @@ -38,7 +38,7 @@ import {
UNSAFE_DataRouterStateContext as DataRouterStateContext,
UNSAFE_FetchersContext as FetchersContext,
UNSAFE_ViewTransitionContext as ViewTransitionContext,
} from "./index";
} from "react-router-dom";

export interface StaticRouterProps {
basename?: string;
Expand Down
8 changes: 7 additions & 1 deletion packages/react-router-dom/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"skipLibCheck": true,

"outDir": ".",
"rootDir": "."
"rootDir": ".",

// Needed for the more-strict pnpm setup, can be removed in v7 since we'll
// be collapsing the lifted server file into the main package export
"paths": {
"react-router-dom": ["./index.tsx"]
}
}
}