fix(ivy): add flag to skip non-exported classes (#33921) (#34340)

In ViewEngine we were only generating code for exported classes, however with Ivy we do it no matter whether the class has been exported or not. These changes add an extra flag that allows consumers to opt into the ViewEngine behavior. The flag works by treating non-exported classes as if they're set to `jit: true`.

Fixes #33724.

PR Close #33921

PR Close #34340
This commit is contained in:
crisbeto
2019-11-21 21:07:54 +01:00
committed by Andrew Kushnir
parent c66fd060c0
commit 7ed984b30c
4 changed files with 69 additions and 3 deletions

View File

@ -644,7 +644,8 @@ export class NgtscProgram implements api.Program {
return new IvyCompilation(
handlers, this.reflector, this.importRewriter, this.incrementalDriver, this.perfRecorder,
this.sourceToFactorySymbols, scopeRegistry);
this.sourceToFactorySymbols, scopeRegistry,
this.options.compileNonExportedClasses !== false);
}
private get reflector(): TypeScriptReflectionHost {