fix(compiler): also count generated files to determine whether to use single file emit
This commit is contained in:
parent
1058b2a778
commit
7c5ecb5b5c
|
@ -227,9 +227,10 @@ class AngularCompilerProgram implements Program {
|
||||||
let emitResult: ts.EmitResult;
|
let emitResult: ts.EmitResult;
|
||||||
let emittedUserTsCount: number;
|
let emittedUserTsCount: number;
|
||||||
try {
|
try {
|
||||||
const emitChangedFilesOnly = this._changedNonGenFileNames &&
|
const useSingleFileEmit = this._changedNonGenFileNames &&
|
||||||
this._changedNonGenFileNames.length < MAX_FILE_COUNT_FOR_SINGLE_FILE_EMIT;
|
(this._changedNonGenFileNames.length + genTsFiles.length) <
|
||||||
if (emitChangedFilesOnly) {
|
MAX_FILE_COUNT_FOR_SINGLE_FILE_EMIT;
|
||||||
|
if (useSingleFileEmit) {
|
||||||
const fileNamesToEmit =
|
const fileNamesToEmit =
|
||||||
[...this._changedNonGenFileNames !, ...genTsFiles.map(gf => gf.genFileUrl)];
|
[...this._changedNonGenFileNames !, ...genTsFiles.map(gf => gf.genFileUrl)];
|
||||||
emitResult = mergeEmitResults(
|
emitResult = mergeEmitResults(
|
||||||
|
|
Loading…
Reference in New Issue