Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit a4f24cb

Browse files
committed
refactor(HMR): rename global.__hmrRefresh function
1 parent b582c65 commit a4f24cb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

bundle-config-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = function (source) {
1212
hmrUpdate();
1313
};
1414
15-
global.__hmrRefresh = function({ type, module } = {}) {
15+
global.hmrRefresh = function({ type, module } = {}) {
1616
if (initialHmrUpdate) {
1717
return;
1818
}
@@ -22,7 +22,7 @@ module.exports = function (source) {
2222
});
2323
};
2424
25-
hmrUpdate().then(() =>{
25+
hmrUpdate().then(() => {
2626
initialHmrUpdate = false;
2727
})
2828
}

demo/AngularApp/app/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (module["hot"]) {
1717
module["hot"].accept(["./app.module"], () => {
1818
// Currently the context is needed only for application style modules.
1919
const moduleContext = {};
20-
global["__hmrRefresh"](moduleContext);
20+
global["hmrRefresh"](moduleContext);
2121
});
2222
}
2323

hot-loader-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports.reload = function ({ type, module }) {
33
if (module.hot) {
44
module.hot.accept();
55
module.hot.dispose(() => {
6-
global.__hmrRefresh({ type: '${type}', module: '${module}' });
6+
global.hmrRefresh({ type: '${type}', module: '${module}' });
77
})
88
}
99
`};

lazy-ngmodule-hot-loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const HOT_DISPOSE = `
66
module.hot.dispose(() => {
77
// Currently the context is needed only for application style modules.
88
const moduleContext = {};
9-
global.__hmrRefresh(moduleContext);
9+
global.hmrRefresh(moduleContext);
1010
});`;
1111
const HMR_HANDLER = `
1212
if (module.hot) {

0 commit comments

Comments
 (0)