From b50c12197e09222908b8cd29bcb8b2c68c5a3445 Mon Sep 17 00:00:00 2001 From: Rob Wormald Date: Fri, 28 Oct 2016 09:48:26 -0400 Subject: [PATCH] fix(compiler): update codegen API (#2919) Fixes #2917. --- packages/webpack/src/plugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webpack/src/plugin.ts b/packages/webpack/src/plugin.ts index f01ae0fe7952..ed6f78c849c9 100644 --- a/packages/webpack/src/plugin.ts +++ b/packages/webpack/src/plugin.ts @@ -207,7 +207,7 @@ export class AotPlugin { // We need to temporarily patch the CodeGenerator until either it's patched or allows us // to pass in our own ReflectorHost. patchReflectorHost(codeGenerator); - this._donePromise = codeGenerator.codegen() + this._donePromise = codeGenerator.codegen({transitiveModules: true}) .then(() => { // Create a new Program, based on the old one. This will trigger a resolution of all // transitive modules, which include files that might just have been generated. @@ -239,7 +239,7 @@ export class AotPlugin { return lazyRoutes; }, {}); }) - .then(() => cb(), (err) => cb(err)); + .then(() => cb(), (err: any) => cb(err)); } private _resolveModule(module: ModuleRoute, containingFile: string) {