mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refactor(webpack): use global require for checking hmr chunks
This commit is contained in:
committed by
Nathan Walker
parent
49343cb9b4
commit
33ab7d27b7
@@ -93,7 +93,7 @@ if (module.hot) {
|
|||||||
|
|
||||||
const requireExists = (path) => {
|
const requireExists = (path) => {
|
||||||
try {
|
try {
|
||||||
__non_webpack_require__(path);
|
global['require'](path);
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
@@ -112,7 +112,7 @@ if (module.hot) {
|
|||||||
logVerbose('LiveSync');
|
logVerbose('LiveSync');
|
||||||
|
|
||||||
if (!hasUpdate()) {
|
if (!hasUpdate()) {
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
await checkAndApply();
|
await checkAndApply();
|
||||||
|
|||||||
Reference in New Issue
Block a user