Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): update render if it is invalidated (#7347)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 8, 2022
1 parent 4660cc5 commit e22bbcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/runtime/vite-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default async (ssrContext) => {

// Execute SSR bundle on demand
const start = performance.now()
render = render || (await runner.executeFile(viteNodeOptions.entryPath)).default
render = (updates.has(viteNodeOptions.entryPath) || !render) ? (await runner.executeFile(viteNodeOptions.entryPath)).default : render
if (updates.size) {
const time = Math.round((performance.now() - start) * 1000) / 1000
consola.success(`Vite server hmr ${updates.size} files`, time ? `in ${time}ms` : '')
Expand Down

0 comments on commit e22bbcc

Please sign in to comment.