This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree 2 files changed +4
-9
lines changed
2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -6,19 +6,19 @@ module.exports = function (source) {
6
6
if (module.hot) {
7
7
const hmrUpdate = require("nativescript-dev-webpack/hmr").hmrUpdate;
8
8
9
- global.__hmrLiveSync = global.__onLiveSync;
9
+ global.__hmrSync = global.__onLiveSync;
10
10
11
11
global.__onLiveSync = function () {
12
- console.log("HMR: Sync...");
13
12
hmrUpdate();
14
13
};
15
14
16
- // global.__hmrSync
17
15
global.__hmrRefresh = function({ type, module }) {
18
16
setTimeout(() => {
19
- global.__hmrLiveSync ({ type, module });
17
+ global.__hmrSync ({ type, module });
20
18
});
21
19
};
20
+
21
+ global.__onLiveSync();
22
22
}
23
23
` ;
24
24
Original file line number Diff line number Diff line change @@ -7,18 +7,13 @@ import { AppModule } from "./app.module";
7
7
let options : AppOptions = { } ;
8
8
9
9
if ( module [ "hot" ] ) {
10
- const hmrUpdate = require ( "nativescript-dev-webpack/hmr" ) . hmrUpdate ;
11
-
12
10
options . hmrOptions = {
13
11
moduleTypeFactory : ( ) => AppModule ,
14
12
livesyncCallback : ( platformReboot ) => {
15
- console . log ( "HMR livesyncCallback: Sync..." )
16
13
setTimeout ( platformReboot , 0 ) ;
17
14
} ,
18
15
}
19
16
20
- hmrUpdate ( ) ;
21
-
22
17
// Path to your app module.
23
18
// You might have to change it if your module is in a different place.
24
19
module [ "hot" ] . accept ( [ "./app.module" ] , global [ "__hmrRefresh" ] ) ;
You can’t perform that action at this time.
0 commit comments