This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree 5 files changed +7
-7
lines changed
5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ module.exports = function (source) {
12
12
hmrUpdate();
13
13
};
14
14
15
- global.hmrRefresh = function({ type, module } = {}) {
15
+ global.hmrRefresh = function({ type, path } = {}) {
16
16
if (global.__initialHmrUpdate) {
17
17
return;
18
18
}
19
19
20
20
setTimeout(() => {
21
- global.__hmrSyncBackup({ type, module });
21
+ global.__hmrSyncBackup({ type, path });
22
22
});
23
23
};
24
24
Original file line number Diff line number Diff line change 1
- module . exports . reload = function ( { type, module } ) {
1
+ module . exports . reload = function ( { type, path } ) {
2
2
return `
3
3
if (module.hot) {
4
4
module.hot.accept();
5
5
module.hot.dispose(() => {
6
- global.hmrRefresh({ type: '${ type } ', module : '${ module } ' });
6
+ global.hmrRefresh({ type: '${ type } ', path : '${ path } ' });
7
7
})
8
8
}
9
9
` } ;
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ const { reload } = require("./hot-loader-helper");
3
3
module . exports = function ( source ) {
4
4
const typeMarkup = "markup" ;
5
5
const modulePath = this . resourcePath . replace ( this . rootContext , "." ) ;
6
- return `${ source } ;${ reload ( { type : typeMarkup , module : modulePath } ) } ` ;
6
+ return `${ source } ;${ reload ( { type : typeMarkup , path : modulePath } ) } ` ;
7
7
} ;
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ const { reload } = require("./hot-loader-helper");
3
3
module . exports = function ( source ) {
4
4
const typeScript = "script" ;
5
5
const modulePath = this . resourcePath . replace ( this . rootContext , "." ) ;
6
- return `${ source } ;${ reload ( { type : typeScript , module : modulePath } ) } ` ;
6
+ return `${ source } ;${ reload ( { type : typeScript , path : modulePath } ) } ` ;
7
7
} ;
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ const { reload } = require("./hot-loader-helper");
3
3
module . exports = function ( source ) {
4
4
const typeStyle = "style" ;
5
5
const modulePath = this . resourcePath . replace ( this . rootContext , "." ) ;
6
- return `${ source } ;${ reload ( { type : typeStyle , module : modulePath } ) } ` ;
6
+ return `${ source } ;${ reload ( { type : typeStyle , path : modulePath } ) } ` ;
7
7
} ;
You can’t perform that action at this time.
0 commit comments