diff --git a/packages/bazel/src/ng_module.bzl b/packages/bazel/src/ng_module.bzl index 5816d44025..a155413283 100644 --- a/packages/bazel/src/ng_module.bzl +++ b/packages/bazel/src/ng_module.bzl @@ -175,6 +175,8 @@ def _expected_outs(ctx): metadata = [".metadata.json"] else: devmode_js = [".js"] + if not _is_bazel(): + devmode_js += ".ngfactory.js" summaries = [] metadata = [] elif include_ng_files and short_path.endswith(".css"): diff --git a/packages/bazel/src/ngc-wrapped/index.ts b/packages/bazel/src/ngc-wrapped/index.ts index 22f813b434..4e1e92730d 100644 --- a/packages/bazel/src/ngc-wrapped/index.ts +++ b/packages/bazel/src/ngc-wrapped/index.ts @@ -127,7 +127,11 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true, // Disable downleveling and Closure annotation if in Ivy mode. if (isInIvyMode) { - compilerOpts.annotateForClosureCompiler = false; + // In pass-through mode for TypeScript, we want to turn off decorator transpilation entirely. + // This causes ngc to be have exactly like tsc. + if (compilerOpts.enableIvy === 'tsc') { + compilerOpts.annotateForClosureCompiler = false; + } compilerOpts.annotationsAs = 'decorators'; }