Skip to content

Commit 4966aff

Browse files
committed
fix: force trigger hmr check in some abnormal situation
1 parent 2c31b94 commit 4966aff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/cli/lib/runtime/utils/dynamic-build.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ async function dynamicBuild( page ) {
5353
}
5454

5555
if ( json.success && ( json.waitHotApply === true ) ) {
56+
if ( module.hot.status() === 'idle' ) {
57+
// force trigger hmr update if still in idle status
58+
try {
59+
await module.hot.check( true )
60+
} catch ( e ) {
61+
console.log( e )
62+
}
63+
}
5664
await promise
5765
}
5866
}

0 commit comments

Comments
 (0)