Skip to content

Commit 4505a29

Browse files
committed
update optimizeDeps
1 parent c5119e8 commit 4505a29

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

packages/react-router-cloudflare/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@
1515
"typings": "dist/index.d.ts",
1616
"exports": {
1717
".": {
18-
"node": {
19-
"types": "./dist/index.d.ts",
20-
"module-sync": "./dist/index.mjs",
21-
"default": "./dist/index.js"
22-
},
2318
"import": {
2419
"types": "./dist/index.d.mts",
2520
"default": "./dist/index.mjs"

packages/react-router-dev/vite/plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = (_config) => {
831831
// Pre-bundle router dependencies to avoid router duplicates.
832832
// Mismatching routers cause `Error: You must render this element inside a <Remix> element`.
833833
"react-router",
834+
"react-router/dom",
834835
// Check to avoid "Failed to resolve dependency: react-router-dom, present in 'optimizeDeps.include'"
835836
...(hasDependency("react-router-dom")
836837
? ["react-router-dom"]
@@ -849,6 +850,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = (_config) => {
849850

850851
// see description for `optimizeDeps.include`
851852
"react-router",
853+
"react-router/dom",
852854
"react-router-dom",
853855
],
854856
},

packages/react-router/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@
3939
}
4040
},
4141
"./types": {
42-
"import": {
43-
"types": "./dist/lib/types.d.mts"
44-
},
45-
"default": {
46-
"types": "./dist/lib/types.d.ts"
47-
}
42+
"types": "./dist/lib/types.d.ts"
4843
},
4944
"./dom": {
5045
"node": {

0 commit comments

Comments
 (0)