Skip to content

Commit 3c55392

Browse files
committed
chore: run hmr at first
1 parent 70a4dd7 commit 3c55392

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
@@ -1002,16 +1002,15 @@ async function buildEnvironment(
10021002

10031003
const startTime = Date.now()
10041004
const hmrOutput = (await bundle!.generateHmrPatch([file]))!
1005-
// TODO(underfin): rebuild at first could be work.
1005+
1006+
await handleHmrOutput(hmrOutput, file)
1007+
10061008
if (hmrOutput.patch) {
10071009
await build()
10081010
logger.info(
10091011
`${colors.green(`✓ rebuilt in ${displayTime(Date.now() - startTime)}`)}`,
10101012
)
10111013
}
1012-
await handleHmrOutput(hmrOutput, file)
1013-
1014-
// TODO(underfin): The invalidate case is failed because the hmrInvalidate is hang after rebuild at here .
10151014
})
10161015
server.hot.on(
10171016
'vite:invalidate',

0 commit comments

Comments
 (0)