File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
packages/webpack5/src/loaders/nativescript-hot-loader Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 55
66if ( module . hot ) {
77 let hash = __webpack_require__ . h ( ) ;
8+ let hmrBootEmittedSymbol = Symbol . for ( 'HMRBootEmitted' ) ;
89
910 const logVerbose = ( title : string , ...info : any ) => {
1011 if ( __NS_ENV_VERBOSE__ ) {
@@ -115,12 +116,15 @@ if (module.hot) {
115116 return false ;
116117 }
117118
118- await checkAndApply ( ) ;
119- await originalOnLiveSync ( ) ;
120-
121- if ( ! global . hmrBootEmitted ) {
122- global . hmrBootEmitted = true ;
123- setStatus ( hash , 'boot' , 'HMR Enabled - waiting for changes...' ) ;
119+ if ( ! ( await checkAndApply ( ) ) ) {
120+ return false ;
124121 }
122+
123+ await originalOnLiveSync ( ) ;
125124 } ;
125+
126+ if ( ! global [ hmrBootEmittedSymbol ] ) {
127+ global [ hmrBootEmittedSymbol ] = true ;
128+ setStatus ( hash , 'boot' , 'HMR Enabled - waiting for changes...' ) ;
129+ }
126130}
You can’t perform that action at this time.
0 commit comments