Skip to content

Commit

Permalink
chore: bump vite version
Browse files Browse the repository at this point in the history
  • Loading branch information
himself65 committed Oct 24, 2023
1 parent 59bdd25 commit cfa5ef6
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 68 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,5 @@
"react-server-dom-webpack": "18.3.0-canary-a41957507-20231017",
"typescript": "^5.2.2",
"waku": "workspace:*"
},
"pnpm": {
"patchedDependencies": {
"vite@4.4.10": "packages/waku/patches/vite@4.4.10.patch"
}
}
}
2 changes: 1 addition & 1 deletion packages/waku/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@swc/core": "1.3.91",
"@vitejs/plugin-react": "^4.1.0",
"busboy": "^1.6.0",
"vite": "4.4.10"
"vite": "4.5.0"
},
"devDependencies": {
"@swc/cli": "^0.1.62",
Expand Down
19 changes: 0 additions & 19 deletions packages/waku/patches/vite@4.4.10.patch

This file was deleted.

6 changes: 6 additions & 0 deletions packages/waku/src/lib/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const analyzeEntries = async (entriesFile: string) => {
),
],
ssr: {
resolve: {
conditions: ["react-server"],
},
noExternal: /^(?!node:)/,
},
resolve: {
Expand Down Expand Up @@ -103,6 +106,9 @@ const buildServerBundle = async (
const serverBuildOutput = await viteBuild({
...configFileConfig(),
ssr: {
resolve: {
externalConditions: ["react-server"],
},
noExternal: Object.values(clientEntryFiles).map(
// FIXME this might not work with pnpm
(fname) =>
Expand Down
5 changes: 5 additions & 0 deletions packages/waku/src/lib/middleware/rsc/worker-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ const getViteServer = async (command: "dev" | "build" | "start") => {
parentPort!.postMessage(mesg);
}),
],
ssr: {
resolve: {
externalConditions: ["react-server"],
},
},
resolve: {
conditions: ["react-server"],
},
Expand Down
62 changes: 19 additions & 43 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 cfa5ef6

Please sign in to comment.