Skip to content

Commit

Permalink
chore: update optimizeDeps for prod
Browse files Browse the repository at this point in the history
chore: move depDep to prod dep.
  • Loading branch information
jacob-ebey committed May 10, 2024
1 parent 27337b0 commit e16afd9
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 40 deletions.
4 changes: 2 additions & 2 deletions packages/remix-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"react-refresh": "^0.14.0",
"react-router": "workspace:*",
"semver": "^7.3.7",
"set-cookie-parser": "^2.6.0"
"set-cookie-parser": "^2.6.0",
"unplugin-rsc": "0.0.9"
},
"devDependencies": {
"@react-router/serve": "workspace:*",
Expand All @@ -72,7 +73,6 @@
"react-server-dom-diy": "0.0.0-experimental-15a3a5622-202404158",
"strip-ansi": "^6.0.1",
"tiny-invariant": "^1.2.0",
"unplugin-rsc": "0.0.9",
"vite": "^5.1.0",
"wrangler": "^3.28.2"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,17 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = (_config) => {
const env = process.env.REACT_SERVER_BUILD ? "server" : "client";

switch (env) {
case "client":
return {
optimizeDeps: {
include: [
"react",
"react/jsx-runtime",
"react/jsx-dev-runtime",
"react-server-dom-diy/client",
],
},
};
case "server":
return {
optimizeDeps: {
Expand Down
79 changes: 41 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e16afd9

Please sign in to comment.