Skip to content

Commit fb0dd5f

Browse files
alan-agius4alexeagle
authored andcommitted
fix(@angular-devkit/build-angular): set the proper type to fileReplacements
Closes #11294
1 parent b4d135a commit fb0dd5f

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

packages/angular_devkit/build_angular/src/browser/schema.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export interface BrowserBuilderSchema {
4949
/**
5050
* Replace files with other files in the build.
5151
*/
52-
fileReplacements: FileReplacements[];
52+
fileReplacements: FileReplacement[];
5353

5454
/**
5555
* Path where output will be placed.

packages/angular_devkit/build_angular/src/extract-i18n/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ export class ExtractI18nBuilder implements Builder<ExtractI18nBuilderOptions> {
8585

8686
// Extracting i18n uses the browser target webpack config with some specific options.
8787
const webpackConfig = this.buildWebpackConfig(root, projectRoot, {
88-
...browserOptions,
88+
// todo: remove this casting when 'CurrentFileReplacement' is changed to 'FileReplacement'
89+
...(browserOptions as NormalizedBrowserBuilderSchema),
8990
optimization: false,
9091
i18nLocale: options.i18nLocale,
9192
i18nFormat: options.i18nFormat,

packages/angular_devkit/build_angular/src/server/schema.d.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8+
9+
import { FileReplacement } from '../browser/schema';
10+
811
export interface BuildWebpackServerSchema {
912
/**
1013
* The name of the TypeScript configuration file.
@@ -80,7 +83,7 @@ export interface BuildWebpackServerSchema {
8083
/**
8184
* Replace files with other files in the build.
8285
*/
83-
fileReplacements: FileReplacements[];
86+
fileReplacements: FileReplacement[];
8487
/**
8588
* Define the output filename cache-busting hashing mode.
8689
*/
@@ -125,9 +128,9 @@ export interface BuildWebpackServerSchema {
125128
* Run build when files change.
126129
*/
127130
watch?: boolean;
128-
/**
129-
* Enable and define the file watching poll time period in milliseconds.
130-
*/
131+
/**
132+
* Enable and define the file watching poll time period in milliseconds.
133+
*/
131134
poll?: number;
132135
}
133136

0 commit comments

Comments
 (0)