Skip to content

Commit

Permalink
optimize deps update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Feb 18, 2025
1 parent a30f116 commit 7471a25
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-router-devtools",
"description": "Devtools for React Router - debug, trace, find hydration errors, catch bugs and inspect server/client data with react-router-devtools",
"author": "Alem Tuzlak",
"version": "1.1.4",
"version": "1.1.5",
"license": "MIT",
"keywords": [
"react-router",
Expand Down
16 changes: 16 additions & 0 deletions src/vite/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
throw new Error("react-router-devtools plugin has to be before the react-router plugin!")
}
},
config(config) {
config.optimizeDeps = {
...config.optimizeDeps,
include: [
...(config.optimizeDeps?.include ?? []),
"react-router-devtools > beautify",
"react-router-devtools > react-diff-viewer-continued",
"react-router-devtools > react-d3-tree",
"react-router-devtools > classnames",
"react-router-devtools > @bkrem/react-transition-group",
"react-router-devtools/client",
"react-router-devtools/context",
"react-router-devtools/server",
],
}
},
async transform(code, id) {
const isRoot = id.endsWith("/root.tsx") || id.endsWith("/root.jsx")
if (!isRoot) {
Expand Down

0 comments on commit 7471a25

Please sign in to comment.