Skip to content

Commit

Permalink
chore: fallback hmr support
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Oct 9, 2024
1 parent 3417c13 commit 0a65d51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vike-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@
"@universal-middleware/webroute": "^0",
"@universal-middleware/express": "^0"
}
}
}
4 changes: 4 additions & 0 deletions packages/vike-node/src/runtime/vike-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ async function renderPageWeb<PlatformRequest>({
}

export const renderPageUniversal = ((options?) => async (request, context, runtime: any) => {
if (runtime.req || runtime.env?.incoming) {
globalStore.setupHMRProxy(runtime.req ?? runtime.env?.incoming);
}

if (globalStore.isPluginLoaded) {
const handled = await web(request)

Expand Down

0 comments on commit 0a65d51

Please sign in to comment.