Skip to content

Commit 1e7feb5

Browse files
clydinKeen Yee Liau
authored and
Keen Yee Liau
committed
fix(@ngtools/webpack): remove deprecated singleFileIncludes option
1 parent a2e44bb commit 1e7feb5

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

packages/ngtools/webpack/src/angular_compiler_plugin.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ export interface AngularCompilerPluginOptions {
7979
skipCodeGeneration?: boolean;
8080
hostReplacementPaths?: { [path: string]: string } | ((path: string) => string);
8181
forkTypeChecker?: boolean;
82-
// TODO: remove singleFileIncludes for 2.0, this is just to support old projects that did not
83-
// include 'polyfills.ts' in `tsconfig.spec.json'.
84-
singleFileIncludes?: string[];
8582
i18nInFile?: string;
8683
i18nInFormat?: string;
8784
i18nOutFile?: string;
@@ -116,7 +113,6 @@ export class AngularCompilerPlugin {
116113
// TS compilation.
117114
private _compilerOptions: CompilerOptions;
118115
private _rootNames: string[];
119-
private _singleFileIncludes: string[] = [];
120116
private _program: (ts.Program | Program) | null;
121117
private _compilerHost: WebpackCompilerHost & CompilerHost;
122118
private _moduleResolutionCache: ts.ModuleResolutionCache;
@@ -203,17 +199,13 @@ export class AngularCompilerPlugin {
203199
basePath = path.resolve(process.cwd(), options.basePath);
204200
}
205201

206-
if (options.singleFileIncludes !== undefined) {
207-
this._singleFileIncludes.push(...options.singleFileIncludes);
208-
}
209-
210202
// Parse the tsconfig contents.
211203
const config = readConfiguration(this._tsConfigPath);
212204
if (config.errors && config.errors.length) {
213205
throw new Error(formatDiagnostics(config.errors));
214206
}
215207

216-
this._rootNames = config.rootNames.concat(...this._singleFileIncludes);
208+
this._rootNames = config.rootNames;
217209
this._compilerOptions = { ...config.options, ...options.compilerOptions };
218210
this._basePath = config.options.basePath || basePath || '';
219211

@@ -351,7 +343,7 @@ export class AngularCompilerPlugin {
351343
// When a new root name (like a lazy route) is added, it won't be available from
352344
// following imports on the existing files, so we need to get the new list of root files.
353345
const config = readConfiguration(this._tsConfigPath);
354-
this._rootNames = config.rootNames.concat(...this._singleFileIncludes);
346+
this._rootNames = config.rootNames;
355347

356348
// Update the forked type checker with all changed compilation files.
357349
// This includes templates, that also need to be reloaded on the type checker.

0 commit comments

Comments
 (0)