1 | /**
|
2 | * Browser target options
|
3 | */
|
4 | export interface Schema {
|
5 | /**
|
6 | * A list of CommonJS or AMD packages that are allowed to be used without a build time
|
7 | * warning. Use `'*'` to allow all.
|
8 | */
|
9 | allowedCommonJsDependencies?: string[];
|
10 | /**
|
11 | * Build using Ahead of Time compilation.
|
12 | */
|
13 | aot?: boolean;
|
14 | /**
|
15 | * List of static application assets.
|
16 | */
|
17 | assets?: AssetPattern[];
|
18 | /**
|
19 | * Base url for the application being built.
|
20 | */
|
21 | baseHref?: string;
|
22 | /**
|
23 | * Budget thresholds to ensure parts of your application stay within boundaries which you
|
24 | * set.
|
25 | */
|
26 | budgets?: Budget[];
|
27 | /**
|
28 | * Enables advanced build optimizations when using the 'aot' option.
|
29 | */
|
30 | buildOptimizer?: boolean;
|
31 | /**
|
32 | * Generate a seperate bundle containing code used across multiple bundles.
|
33 | */
|
34 | commonChunk?: boolean;
|
35 | /**
|
36 | * Define the crossorigin attribute setting of elements that provide CORS support.
|
37 | */
|
38 | crossOrigin?: CrossOrigin;
|
39 | /**
|
40 | * Delete the output path before building.
|
41 | */
|
42 | deleteOutputPath?: boolean;
|
43 | /**
|
44 | * Customize the base path for the URLs of resources in 'index.html' and component
|
45 | * stylesheets. This option is only necessary for specific deployment scenarios, such as
|
46 | * with Angular Elements or when utilizing different CDN locations.
|
47 | */
|
48 | deployUrl?: string;
|
49 | /**
|
50 | * Extract all licenses in a separate file.
|
51 | */
|
52 | extractLicenses?: boolean;
|
53 | /**
|
54 | * Replace compilation source files with other compilation source files in the build.
|
55 | */
|
56 | fileReplacements?: FileReplacement[];
|
57 | /**
|
58 | * How to handle duplicate translations for i18n.
|
59 | */
|
60 | i18nDuplicateTranslation?: I18NTranslation;
|
61 | /**
|
62 | * How to handle missing translations for i18n.
|
63 | */
|
64 | i18nMissingTranslation?: I18NTranslation;
|
65 | /**
|
66 | * Configures the generation of the application's HTML index.
|
67 | */
|
68 | index: IndexUnion;
|
69 | /**
|
70 | * The stylesheet language to use for the application's inline component styles.
|
71 | */
|
72 | inlineStyleLanguage?: InlineStyleLanguage;
|
73 | /**
|
74 | * Translate the bundles in one or more locales.
|
75 | */
|
76 | localize?: Localize;
|
77 | /**
|
78 | * The full path for the main entry point to the app, relative to the current workspace.
|
79 | */
|
80 | main: string;
|
81 | /**
|
82 | * Use file name for lazy loaded chunks.
|
83 | */
|
84 | namedChunks?: boolean;
|
85 | /**
|
86 | * Path to ngsw-config.json.
|
87 | */
|
88 | ngswConfigPath?: string;
|
89 | /**
|
90 | * Enables optimization of the build output. Including minification of scripts and styles,
|
91 | * tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For
|
92 | * more information, see
|
93 | * https://angular.io/guide/workspace-config#optimization-configuration.
|
94 | */
|
95 | optimization?: OptimizationUnion;
|
96 | /**
|
97 | * Define the output filename cache-busting hashing mode.
|
98 | */
|
99 | outputHashing?: OutputHashing;
|
100 | /**
|
101 | * The full path for the new output directory, relative to the current workspace.
|
102 | */
|
103 | outputPath: string;
|
104 | /**
|
105 | * Enable and define the file watching poll time period in milliseconds.
|
106 | */
|
107 | poll?: number;
|
108 | /**
|
109 | * Polyfills to be included in the build.
|
110 | */
|
111 | polyfills?: Polyfills;
|
112 | /**
|
113 | * Do not use the real path when resolving modules. If unset then will default to `true` if
|
114 | * NodeJS option --preserve-symlinks is set.
|
115 | */
|
116 | preserveSymlinks?: boolean;
|
117 | /**
|
118 | * Log progress to the console while building.
|
119 | */
|
120 | progress?: boolean;
|
121 | /**
|
122 | * The path where style resources will be placed, relative to outputPath.
|
123 | */
|
124 | resourcesOutputPath?: string;
|
125 | /**
|
126 | * Global scripts to be included in the build.
|
127 | */
|
128 | scripts?: ScriptElement[];
|
129 | /**
|
130 | * Generates a service worker config for production builds.
|
131 | */
|
132 | serviceWorker?: boolean;
|
133 | /**
|
134 | * Output source maps for scripts and styles. For more information, see
|
135 | * https://angular.io/guide/workspace-config#source-map-configuration.
|
136 | */
|
137 | sourceMap?: SourceMapUnion;
|
138 | /**
|
139 | * Generates a 'stats.json' file which can be analyzed using tools such as
|
140 | * 'webpack-bundle-analyzer'.
|
141 | */
|
142 | statsJson?: boolean;
|
143 | /**
|
144 | * Options to pass to style preprocessors.
|
145 | */
|
146 | stylePreprocessorOptions?: StylePreprocessorOptions;
|
147 | /**
|
148 | * Global styles to be included in the build.
|
149 | */
|
150 | styles?: StyleElement[];
|
151 | /**
|
152 | * Enables the use of subresource integrity validation.
|
153 | */
|
154 | subresourceIntegrity?: boolean;
|
155 | /**
|
156 | * The full path for the TypeScript configuration file, relative to the current workspace.
|
157 | */
|
158 | tsConfig: string;
|
159 | /**
|
160 | * Generate a seperate bundle containing only vendor libraries. This option should only be
|
161 | * used for development to reduce the incremental compilation time.
|
162 | */
|
163 | vendorChunk?: boolean;
|
164 | /**
|
165 | * Adds more details to output logging.
|
166 | */
|
167 | verbose?: boolean;
|
168 | /**
|
169 | * Run build when files change.
|
170 | */
|
171 | watch?: boolean;
|
172 | /**
|
173 | * TypeScript configuration for Web Worker modules.
|
174 | */
|
175 | webWorkerTsConfig?: string;
|
176 | }
|
177 | export type AssetPattern = AssetPatternClass | string;
|
178 | export interface AssetPatternClass {
|
179 | /**
|
180 | * Allow glob patterns to follow symlink directories. This allows subdirectories of the
|
181 | * symlink to be searched.
|
182 | */
|
183 | followSymlinks?: boolean;
|
184 | /**
|
185 | * The pattern to match.
|
186 | */
|
187 | glob: string;
|
188 | /**
|
189 | * An array of globs to ignore.
|
190 | */
|
191 | ignore?: string[];
|
192 | /**
|
193 | * The input directory path in which to apply 'glob'. Defaults to the project root.
|
194 | */
|
195 | input: string;
|
196 | /**
|
197 | * Absolute path within the output.
|
198 | */
|
199 | output: string;
|
200 | }
|
201 | export interface Budget {
|
202 | /**
|
203 | * The baseline size for comparison.
|
204 | */
|
205 | baseline?: string;
|
206 | /**
|
207 | * The threshold for error relative to the baseline (min & max).
|
208 | */
|
209 | error?: string;
|
210 | /**
|
211 | * The maximum threshold for error relative to the baseline.
|
212 | */
|
213 | maximumError?: string;
|
214 | /**
|
215 | * The maximum threshold for warning relative to the baseline.
|
216 | */
|
217 | maximumWarning?: string;
|
218 | /**
|
219 | * The minimum threshold for error relative to the baseline.
|
220 | */
|
221 | minimumError?: string;
|
222 | /**
|
223 | * The minimum threshold for warning relative to the baseline.
|
224 | */
|
225 | minimumWarning?: string;
|
226 | /**
|
227 | * The name of the bundle.
|
228 | */
|
229 | name?: string;
|
230 | /**
|
231 | * The type of budget.
|
232 | */
|
233 | type: Type;
|
234 | /**
|
235 | * The threshold for warning relative to the baseline (min & max).
|
236 | */
|
237 | warning?: string;
|
238 | }
|
239 | /**
|
240 | * The type of budget.
|
241 | */
|
242 | export declare enum Type {
|
243 | All = "all",
|
244 | AllScript = "allScript",
|
245 | Any = "any",
|
246 | AnyComponentStyle = "anyComponentStyle",
|
247 | AnyScript = "anyScript",
|
248 | Bundle = "bundle",
|
249 | Initial = "initial"
|
250 | }
|
251 | /**
|
252 | * Define the crossorigin attribute setting of elements that provide CORS support.
|
253 | */
|
254 | export declare enum CrossOrigin {
|
255 | Anonymous = "anonymous",
|
256 | None = "none",
|
257 | UseCredentials = "use-credentials"
|
258 | }
|
259 | export interface FileReplacement {
|
260 | replace?: string;
|
261 | replaceWith?: string;
|
262 | src?: string;
|
263 | with?: string;
|
264 | }
|
265 | /**
|
266 | * How to handle duplicate translations for i18n.
|
267 | *
|
268 | * How to handle missing translations for i18n.
|
269 | */
|
270 | export declare enum I18NTranslation {
|
271 | Error = "error",
|
272 | Ignore = "ignore",
|
273 | Warning = "warning"
|
274 | }
|
275 | /**
|
276 | * Configures the generation of the application's HTML index.
|
277 | */
|
278 | export type IndexUnion = IndexObject | string;
|
279 | export interface IndexObject {
|
280 | /**
|
281 | * The path of a file to use for the application's generated HTML index.
|
282 | */
|
283 | input: string;
|
284 | /**
|
285 | * The output path of the application's generated HTML index file. The full provided path
|
286 | * will be used and will be considered relative to the application's configured output path.
|
287 | */
|
288 | output?: string;
|
289 | [property: string]: any;
|
290 | }
|
291 | /**
|
292 | * The stylesheet language to use for the application's inline component styles.
|
293 | */
|
294 | export declare enum InlineStyleLanguage {
|
295 | Css = "css",
|
296 | Less = "less",
|
297 | Sass = "sass",
|
298 | Scss = "scss"
|
299 | }
|
300 | /**
|
301 | * Translate the bundles in one or more locales.
|
302 | */
|
303 | export type Localize = string[] | boolean;
|
304 | /**
|
305 | * Enables optimization of the build output. Including minification of scripts and styles,
|
306 | * tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For
|
307 | * more information, see
|
308 | * https://angular.io/guide/workspace-config#optimization-configuration.
|
309 | */
|
310 | export type OptimizationUnion = boolean | OptimizationClass;
|
311 | export interface OptimizationClass {
|
312 | /**
|
313 | * Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
314 | * environment variable can be used to specify a proxy server.
|
315 | */
|
316 | fonts?: FontsUnion;
|
317 | /**
|
318 | * Enables optimization of the scripts output.
|
319 | */
|
320 | scripts?: boolean;
|
321 | /**
|
322 | * Enables optimization of the styles output.
|
323 | */
|
324 | styles?: StylesUnion;
|
325 | }
|
326 | /**
|
327 | * Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY`
|
328 | * environment variable can be used to specify a proxy server.
|
329 | */
|
330 | export type FontsUnion = boolean | FontsClass;
|
331 | export interface FontsClass {
|
332 | /**
|
333 | * Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS
|
334 | * definitions in the application's HTML index file. This option requires internet access.
|
335 | * `HTTPS_PROXY` environment variable can be used to specify a proxy server.
|
336 | */
|
337 | inline?: boolean;
|
338 | }
|
339 | /**
|
340 | * Enables optimization of the styles output.
|
341 | */
|
342 | export type StylesUnion = boolean | StylesClass;
|
343 | export interface StylesClass {
|
344 | /**
|
345 | * Extract and inline critical CSS definitions to improve first paint time.
|
346 | */
|
347 | inlineCritical?: boolean;
|
348 | /**
|
349 | * Minify CSS definitions by removing extraneous whitespace and comments, merging
|
350 | * identifiers and minimizing values.
|
351 | */
|
352 | minify?: boolean;
|
353 | }
|
354 | /**
|
355 | * Define the output filename cache-busting hashing mode.
|
356 | */
|
357 | export declare enum OutputHashing {
|
358 | All = "all",
|
359 | Bundles = "bundles",
|
360 | Media = "media",
|
361 | None = "none"
|
362 | }
|
363 | /**
|
364 | * Polyfills to be included in the build.
|
365 | */
|
366 | export type Polyfills = string[] | string;
|
367 | export type ScriptElement = ScriptClass | string;
|
368 | export interface ScriptClass {
|
369 | /**
|
370 | * The bundle name for this extra entry point.
|
371 | */
|
372 | bundleName?: string;
|
373 | /**
|
374 | * If the bundle will be referenced in the HTML file.
|
375 | */
|
376 | inject?: boolean;
|
377 | /**
|
378 | * The file to include.
|
379 | */
|
380 | input: string;
|
381 | }
|
382 | /**
|
383 | * Output source maps for scripts and styles. For more information, see
|
384 | * https://angular.io/guide/workspace-config#source-map-configuration.
|
385 | */
|
386 | export type SourceMapUnion = boolean | SourceMapClass;
|
387 | export interface SourceMapClass {
|
388 | /**
|
389 | * Output source maps used for error reporting tools.
|
390 | */
|
391 | hidden?: boolean;
|
392 | /**
|
393 | * Output source maps for all scripts.
|
394 | */
|
395 | scripts?: boolean;
|
396 | /**
|
397 | * Output source maps for all styles.
|
398 | */
|
399 | styles?: boolean;
|
400 | /**
|
401 | * Resolve vendor packages source maps.
|
402 | */
|
403 | vendor?: boolean;
|
404 | }
|
405 | /**
|
406 | * Options to pass to style preprocessors.
|
407 | */
|
408 | export interface StylePreprocessorOptions {
|
409 | /**
|
410 | * Paths to include. Paths will be resolved to workspace root.
|
411 | */
|
412 | includePaths?: string[];
|
413 | }
|
414 | export type StyleElement = StyleClass | string;
|
415 | export interface StyleClass {
|
416 | /**
|
417 | * The bundle name for this extra entry point.
|
418 | */
|
419 | bundleName?: string;
|
420 | /**
|
421 | * If the bundle will be referenced in the HTML file.
|
422 | */
|
423 | inject?: boolean;
|
424 | /**
|
425 | * The file to include.
|
426 | */
|
427 | input: string;
|
428 | }
|