mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
fix(vite): update render if it is invalidated (#7347)
This commit is contained in:
parent
4660cc5918
commit
e22bbcc380
@ -22,7 +22,7 @@ export default async (ssrContext) => {
|
|||||||
|
|
||||||
// Execute SSR bundle on demand
|
// Execute SSR bundle on demand
|
||||||
const start = performance.now()
|
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) {
|
if (updates.size) {
|
||||||
const time = Math.round((performance.now() - start) * 1000) / 1000
|
const time = Math.round((performance.now() - start) * 1000) / 1000
|
||||||
consola.success(`Vite server hmr ${updates.size} files`, time ? `in ${time}ms` : '')
|
consola.success(`Vite server hmr ${updates.size} files`, time ? `in ${time}ms` : '')
|
||||||
|
Loading…
Reference in New Issue
Block a user