mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Use global.require in loadModule
This is required when preparing only the tns-core-modules for snapshotting. Otherwise webpack replaces this with custom webpack contexts (https://webpack.github.io/docs/configuration.html#automatically-created-contexts-defaults-module-xxxcontextxxx) which is not what we want.
This commit is contained in:
@ -25,7 +25,7 @@ global.loadModule = function(name: string): any {
|
|||||||
if (loader) {
|
if (loader) {
|
||||||
return loader();
|
return loader();
|
||||||
} else {
|
} else {
|
||||||
return require(name);
|
return global.require(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user