feat(ivy): enable .ngfactory.js generation in g3 only (#25392)
This turns on generation of ngfactory.js files when compiling in Ivy mode in g3. They're not turned on for Bazel users as there appears to be a strange interaction with the way our tests run in Bazel mode. PR Close #25392
This commit is contained in:
parent
33fd7e0784
commit
7058072ff6
|
@ -175,6 +175,8 @@ def _expected_outs(ctx):
|
||||||
metadata = [".metadata.json"]
|
metadata = [".metadata.json"]
|
||||||
else:
|
else:
|
||||||
devmode_js = [".js"]
|
devmode_js = [".js"]
|
||||||
|
if not _is_bazel():
|
||||||
|
devmode_js += ".ngfactory.js"
|
||||||
summaries = []
|
summaries = []
|
||||||
metadata = []
|
metadata = []
|
||||||
elif include_ng_files and short_path.endswith(".css"):
|
elif include_ng_files and short_path.endswith(".css"):
|
||||||
|
|
|
@ -127,7 +127,11 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
||||||
|
|
||||||
// Disable downleveling and Closure annotation if in Ivy mode.
|
// Disable downleveling and Closure annotation if in Ivy mode.
|
||||||
if (isInIvyMode) {
|
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';
|
compilerOpts.annotationsAs = 'decorators';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue