Skip to content

Commit

Permalink
Fix react-router-dom/server index.ts import from pnpm migration (#11514)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Apr 30, 2024
1 parent e0b1db4 commit fdff9dd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-ghosts-give.md
@@ -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
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
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"]
}
}
}

0 comments on commit fdff9dd

Please sign in to comment.