Skip to content

Commit 939105b

Browse files
committed
chore: run hmr at first
1 parent 8e1b8f7 commit 939105b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/vite/src/node/build.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,16 +987,15 @@ async function buildEnvironment(
987987

988988
const startTime = Date.now()
989989
const hmrOutput = (await bundle!.generateHmrPatch([file]))!
990-
// TODO(underfin): rebuild at first could be work.
990+
991+
await handleHmrOutput(hmrOutput, file)
992+
991993
if (hmrOutput.patch) {
992994
await build()
993995
logger.info(
994996
`${colors.green(`✓ rebuilt in ${displayTime(Date.now() - startTime)}`)}`,
995997
)
996998
}
997-
await handleHmrOutput(hmrOutput, file)
998-
999-
// TODO(underfin): The invalidate case is failed because the hmrInvalidate is hang after rebuild at here .
1000999
})
10011000
server.hot.on(
10021001
'vite:invalidate',

0 commit comments

Comments
 (0)