From f6eb458ff3a154f8059661d63ec948ed6c11158a Mon Sep 17 00:00:00 2001 From: Jason Zhekov Date: Thu, 19 May 2016 16:35:30 +0300 Subject: [PATCH] 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. --- globals/globals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/globals/globals.ts b/globals/globals.ts index 16dac3a1d..03737a50e 100644 --- a/globals/globals.ts +++ b/globals/globals.ts @@ -25,7 +25,7 @@ global.loadModule = function(name: string): any { if (loader) { return loader(); } else { - return require(name); + return global.require(name); } }