mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
fix(@angular-devkit/build-angular): set the proper type to fileReplacements
Closes #11294
This commit is contained in:
parent
65ede1fd6e
commit
e16c8bbe87
@ -49,7 +49,7 @@ export interface BrowserBuilderSchema {
|
||||
/**
|
||||
* Replace files with other files in the build.
|
||||
*/
|
||||
fileReplacements: FileReplacements[];
|
||||
fileReplacements: FileReplacement[];
|
||||
|
||||
/**
|
||||
* Path where output will be placed.
|
||||
|
@ -85,7 +85,8 @@ export class ExtractI18nBuilder implements Builder<ExtractI18nBuilderOptions> {
|
||||
|
||||
// Extracting i18n uses the browser target webpack config with some specific options.
|
||||
const webpackConfig = this.buildWebpackConfig(root, projectRoot, {
|
||||
...browserOptions,
|
||||
// todo: remove this casting when 'CurrentFileReplacement' is changed to 'FileReplacement'
|
||||
...(browserOptions as NormalizedBrowserBuilderSchema),
|
||||
optimization: false,
|
||||
i18nLocale: options.i18nLocale,
|
||||
i18nFormat: options.i18nFormat,
|
||||
|
@ -5,6 +5,9 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import { FileReplacement } from '../browser/schema';
|
||||
|
||||
export interface BuildWebpackServerSchema {
|
||||
/**
|
||||
* The name of the TypeScript configuration file.
|
||||
@ -80,7 +83,7 @@ export interface BuildWebpackServerSchema {
|
||||
/**
|
||||
* Replace files with other files in the build.
|
||||
*/
|
||||
fileReplacements: FileReplacements[];
|
||||
fileReplacements: FileReplacement[];
|
||||
/**
|
||||
* Define the output filename cache-busting hashing mode.
|
||||
*/
|
||||
@ -125,9 +128,9 @@ export interface BuildWebpackServerSchema {
|
||||
* Run build when files change.
|
||||
*/
|
||||
watch?: boolean;
|
||||
/**
|
||||
* Enable and define the file watching poll time period in milliseconds.
|
||||
*/
|
||||
/**
|
||||
* Enable and define the file watching poll time period in milliseconds.
|
||||
*/
|
||||
poll?: number;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user