mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +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) {
|
||||
return loader();
|
||||
} else {
|
||||
return require(name);
|
||||
return global.require(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user