Skip to content

Commit 4ac822d

Browse files
authored
Merge pull request NativeScript#624 from NativeScript/buhov/snapshot-fix
Call the runtime require function instead of the webpack's one in ns-module-factory-loader
2 parents a31b2aa + 5e63ac3 commit 4ac822d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nativescript-angular/router/ns-module-factory-loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class NSModuleFactoryLoader implements NgModuleFactoryLoader {
4242
private loadAndCompile(modulePath: string, exportName: string): Promise<NgModuleFactory<any>> {
4343
modulePath = getAbsolutePath(modulePath);
4444

45-
let loadedModule = require(modulePath)[exportName];
45+
let loadedModule = global.require(modulePath)[exportName];
4646
checkNotEmpty(loadedModule, modulePath, exportName);
4747

4848
return Promise.resolve(this.compiler.compileModuleAsync(loadedModule));

0 commit comments

Comments
 (0)