Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4ac822d

Browse files
authored
Merge pull request #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)

AltStyle によって変換されたページ (->オリジナル) /