File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/app/src/sandbox/eval Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export default class Manager {
8585 dependencies: Object ;
8686 webpackHMR: boolean ;
8787 hardReload: boolean ;
88- hmrStatus: 'idle' | 'check' | 'apply' | 'fail' = 'idle' ;
88+ hmrStatus: 'idle' | 'check' | 'apply' | 'fail' | 'dispose' = 'idle' ;
8989 testRunner: TestRunner ;
9090
9191 // List of modules that are being transpiled, to prevent duplicate jobs.
@@ -201,8 +201,6 @@ export default class Manager {
201201 return { } ;
202202 }
203203
204- this . hmrStatus = 'apply' ;
205-
206204 // Evaluate the *changed* HMR modules first
207205 this . getTranspiledModules ( )
208206 . filter ( t => t . hmrConfig && t . hmrConfig . isDirty ( ) )
Original file line number Diff line number Diff line change @@ -666,9 +666,13 @@ export default class TranspiledModule {
666666 }
667667
668668 if ( this . hmrConfig ) {
669+ /* eslint-disable no-param-reassign */
670+ manager . hmrStatus = 'dispose' ;
669671 // Call module.hot.dispose handler
670672 // https://webpack.js.org/api/hot-module-replacement/#dispose-or-adddisposehandler-
671673 this . hmrConfig . callDisposeHandler ( ) ;
674+ manager . hmrStatus = 'idle' ;
675+ /* eslint-enable */
672676 }
673677
674678 const hotData = this . hmrConfig ? this . hmrConfig . data : undefined ;
@@ -784,11 +788,15 @@ export default class TranspiledModule {
784788 { asUMD }
785789 ) ;
786790
791+ /* eslint-disable no-param-reassign */
792+ manager . hmrStatus = 'apply' ;
787793 const hmrConfig = this . hmrConfig ;
788794 if ( hmrConfig && hmrConfig . isHot ( ) ) {
789795 hmrConfig . setDirty ( false ) ;
790796 hmrConfig . callAcceptCallback ( ) ;
791797 }
798+ manager . hmrStatus = 'idle' ;
799+ /* eslint-enable */
792800
793801 return exports ;
794802 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments