1 | {
|
2 | "$schema": "http://json-schema.org/draft-07/schema",
|
3 | "title": "Custom webpack browser schema for Build Facade",
|
4 | "description": "Browser target options",
|
5 | "type": "object",
|
6 | "properties": {
|
7 | "assets": {
|
8 | "type": "array",
|
9 | "description": "List of static application assets.",
|
10 | "default": [],
|
11 | "items": {
|
12 | "$ref": "#/definitions/assetPattern"
|
13 | }
|
14 | },
|
15 | "main": {
|
16 | "type": "string",
|
17 | "description": "The full path for the main entry point to the app, relative to the current workspace."
|
18 | },
|
19 | "polyfills": {
|
20 | "description": "Polyfills to be included in the build.",
|
21 | "oneOf": [
|
22 | {
|
23 | "type": "array",
|
24 | "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
|
25 | "items": {
|
26 | "type": "string",
|
27 | "uniqueItems": true
|
28 | },
|
29 | "default": []
|
30 | },
|
31 | {
|
32 | "type": "string",
|
33 | "description": "The full path for the polyfills file, relative to the current workspace or a module specifier. Example: 'zone.js'."
|
34 | }
|
35 | ]
|
36 | },
|
37 | "tsConfig": {
|
38 | "type": "string",
|
39 | "description": "The full path for the TypeScript configuration file, relative to the current workspace."
|
40 | },
|
41 | "scripts": {
|
42 | "description": "Global scripts to be included in the build.",
|
43 | "type": "array",
|
44 | "default": [],
|
45 | "items": {
|
46 | "oneOf": [
|
47 | {
|
48 | "type": "object",
|
49 | "properties": {
|
50 | "input": {
|
51 | "type": "string",
|
52 | "description": "The file to include.",
|
53 | "pattern": "\\.[cm]?jsx?$"
|
54 | },
|
55 | "bundleName": {
|
56 | "type": "string",
|
57 | "pattern": "^[\\w\\-.]*$",
|
58 | "description": "The bundle name for this extra entry point."
|
59 | },
|
60 | "inject": {
|
61 | "type": "boolean",
|
62 | "description": "If the bundle will be referenced in the HTML file.",
|
63 | "default": true
|
64 | }
|
65 | },
|
66 | "additionalProperties": false,
|
67 | "required": [
|
68 | "input"
|
69 | ]
|
70 | },
|
71 | {
|
72 | "type": "string",
|
73 | "description": "The file to include.",
|
74 | "pattern": "\\.[cm]?jsx?$"
|
75 | }
|
76 | ]
|
77 | }
|
78 | },
|
79 | "styles": {
|
80 | "description": "Global styles to be included in the build.",
|
81 | "type": "array",
|
82 | "default": [],
|
83 | "items": {
|
84 | "oneOf": [
|
85 | {
|
86 | "type": "object",
|
87 | "properties": {
|
88 | "input": {
|
89 | "type": "string",
|
90 | "description": "The file to include.",
|
91 | "pattern": "\\.(?:css|scss|sass|less)$"
|
92 | },
|
93 | "bundleName": {
|
94 | "type": "string",
|
95 | "pattern": "^[\\w\\-.]*$",
|
96 | "description": "The bundle name for this extra entry point."
|
97 | },
|
98 | "inject": {
|
99 | "type": "boolean",
|
100 | "description": "If the bundle will be referenced in the HTML file.",
|
101 | "default": true
|
102 | }
|
103 | },
|
104 | "additionalProperties": false,
|
105 | "required": [
|
106 | "input"
|
107 | ]
|
108 | },
|
109 | {
|
110 | "type": "string",
|
111 | "description": "The file to include.",
|
112 | "pattern": "\\.(?:css|scss|sass|less)$"
|
113 | }
|
114 | ]
|
115 | }
|
116 | },
|
117 | "inlineStyleLanguage": {
|
118 | "description": "The stylesheet language to use for the application's inline component styles.",
|
119 | "type": "string",
|
120 | "default": "css",
|
121 | "enum": [
|
122 | "css",
|
123 | "less",
|
124 | "sass",
|
125 | "scss"
|
126 | ]
|
127 | },
|
128 | "stylePreprocessorOptions": {
|
129 | "description": "Options to pass to style preprocessors.",
|
130 | "type": "object",
|
131 | "properties": {
|
132 | "includePaths": {
|
133 | "description": "Paths to include. Paths will be resolved to workspace root.",
|
134 | "type": "array",
|
135 | "items": {
|
136 | "type": "string"
|
137 | },
|
138 | "default": []
|
139 | }
|
140 | },
|
141 | "additionalProperties": false
|
142 | },
|
143 | "optimization": {
|
144 | "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
|
145 | "default": true,
|
146 | "x-user-analytics": "ep.ng_optimization",
|
147 | "oneOf": [
|
148 | {
|
149 | "type": "object",
|
150 | "properties": {
|
151 | "scripts": {
|
152 | "type": "boolean",
|
153 | "description": "Enables optimization of the scripts output.",
|
154 | "default": true
|
155 | },
|
156 | "styles": {
|
157 | "description": "Enables optimization of the styles output.",
|
158 | "default": true,
|
159 | "oneOf": [
|
160 | {
|
161 | "type": "object",
|
162 | "properties": {
|
163 | "minify": {
|
164 | "type": "boolean",
|
165 | "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
|
166 | "default": true
|
167 | },
|
168 | "inlineCritical": {
|
169 | "type": "boolean",
|
170 | "description": "Extract and inline critical CSS definitions to improve first paint time.",
|
171 | "default": true
|
172 | }
|
173 | },
|
174 | "additionalProperties": false
|
175 | },
|
176 | {
|
177 | "type": "boolean"
|
178 | }
|
179 | ]
|
180 | },
|
181 | "fonts": {
|
182 | "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
183 | "default": true,
|
184 | "oneOf": [
|
185 | {
|
186 | "type": "object",
|
187 | "properties": {
|
188 | "inline": {
|
189 | "type": "boolean",
|
190 | "description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
|
191 | "default": true
|
192 | }
|
193 | },
|
194 | "additionalProperties": false
|
195 | },
|
196 | {
|
197 | "type": "boolean"
|
198 | }
|
199 | ]
|
200 | }
|
201 | },
|
202 | "additionalProperties": false
|
203 | },
|
204 | {
|
205 | "type": "boolean"
|
206 | }
|
207 | ]
|
208 | },
|
209 | "fileReplacements": {
|
210 | "description": "Replace compilation source files with other compilation source files in the build.",
|
211 | "type": "array",
|
212 | "items": {
|
213 | "$ref": "#/definitions/fileReplacement"
|
214 | },
|
215 | "default": []
|
216 | },
|
217 | "outputPath": {
|
218 | "type": "string",
|
219 | "description": "The full path for the new output directory, relative to the current workspace."
|
220 | },
|
221 | "resourcesOutputPath": {
|
222 | "type": "string",
|
223 | "description": "The path where style resources will be placed, relative to outputPath."
|
224 | },
|
225 | "aot": {
|
226 | "type": "boolean",
|
227 | "description": "Build using Ahead of Time compilation.",
|
228 | "x-user-analytics": "ep.ng_aot",
|
229 | "default": true
|
230 | },
|
231 | "sourceMap": {
|
232 | "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
|
233 | "default": false,
|
234 | "oneOf": [
|
235 | {
|
236 | "type": "object",
|
237 | "properties": {
|
238 | "scripts": {
|
239 | "type": "boolean",
|
240 | "description": "Output source maps for all scripts.",
|
241 | "default": true
|
242 | },
|
243 | "styles": {
|
244 | "type": "boolean",
|
245 | "description": "Output source maps for all styles.",
|
246 | "default": true
|
247 | },
|
248 | "hidden": {
|
249 | "type": "boolean",
|
250 | "description": "Output source maps used for error reporting tools.",
|
251 | "default": false
|
252 | },
|
253 | "vendor": {
|
254 | "type": "boolean",
|
255 | "description": "Resolve vendor packages source maps.",
|
256 | "default": false
|
257 | }
|
258 | },
|
259 | "additionalProperties": false
|
260 | },
|
261 | {
|
262 | "type": "boolean"
|
263 | }
|
264 | ]
|
265 | },
|
266 | "vendorChunk": {
|
267 | "type": "boolean",
|
268 | "description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.",
|
269 | "default": false
|
270 | },
|
271 | "commonChunk": {
|
272 | "type": "boolean",
|
273 | "description": "Generate a seperate bundle containing code used across multiple bundles.",
|
274 | "default": true
|
275 | },
|
276 | "baseHref": {
|
277 | "type": "string",
|
278 | "description": "Base url for the application being built."
|
279 | },
|
280 | "deployUrl": {
|
281 | "type": "string",
|
282 | "description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
|
283 | },
|
284 | "verbose": {
|
285 | "type": "boolean",
|
286 | "description": "Adds more details to output logging.",
|
287 | "default": false
|
288 | },
|
289 | "progress": {
|
290 | "type": "boolean",
|
291 | "description": "Log progress to the console while building.",
|
292 | "default": true
|
293 | },
|
294 | "i18nMissingTranslation": {
|
295 | "type": "string",
|
296 | "description": "How to handle missing translations for i18n.",
|
297 | "enum": [
|
298 | "warning",
|
299 | "error",
|
300 | "ignore"
|
301 | ],
|
302 | "default": "warning"
|
303 | },
|
304 | "i18nDuplicateTranslation": {
|
305 | "type": "string",
|
306 | "description": "How to handle duplicate translations for i18n.",
|
307 | "enum": [
|
308 | "warning",
|
309 | "error",
|
310 | "ignore"
|
311 | ],
|
312 | "default": "warning"
|
313 | },
|
314 | "localize": {
|
315 | "description": "Translate the bundles in one or more locales.",
|
316 | "oneOf": [
|
317 | {
|
318 | "type": "boolean",
|
319 | "description": "Translate all locales."
|
320 | },
|
321 | {
|
322 | "type": "array",
|
323 | "description": "List of locales ID's to translate.",
|
324 | "minItems": 1,
|
325 | "items": {
|
326 | "type": "string",
|
327 | "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$"
|
328 | }
|
329 | }
|
330 | ]
|
331 | },
|
332 | "watch": {
|
333 | "type": "boolean",
|
334 | "description": "Run build when files change.",
|
335 | "default": false
|
336 | },
|
337 | "outputHashing": {
|
338 | "type": "string",
|
339 | "description": "Define the output filename cache-busting hashing mode.",
|
340 | "default": "none",
|
341 | "enum": [
|
342 | "none",
|
343 | "all",
|
344 | "media",
|
345 | "bundles"
|
346 | ]
|
347 | },
|
348 | "poll": {
|
349 | "type": "number",
|
350 | "description": "Enable and define the file watching poll time period in milliseconds."
|
351 | },
|
352 | "deleteOutputPath": {
|
353 | "type": "boolean",
|
354 | "description": "Delete the output path before building.",
|
355 | "default": true
|
356 | },
|
357 | "preserveSymlinks": {
|
358 | "type": "boolean",
|
359 | "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
360 | },
|
361 | "extractLicenses": {
|
362 | "type": "boolean",
|
363 | "description": "Extract all licenses in a separate file.",
|
364 | "default": true
|
365 | },
|
366 | "buildOptimizer": {
|
367 | "type": "boolean",
|
368 | "description": "Enables advanced build optimizations when using the 'aot' option.",
|
369 | "default": true
|
370 | },
|
371 | "namedChunks": {
|
372 | "type": "boolean",
|
373 | "description": "Use file name for lazy loaded chunks.",
|
374 | "default": false
|
375 | },
|
376 | "subresourceIntegrity": {
|
377 | "type": "boolean",
|
378 | "description": "Enables the use of subresource integrity validation.",
|
379 | "default": false
|
380 | },
|
381 | "serviceWorker": {
|
382 | "type": "boolean",
|
383 | "description": "Generates a service worker config for production builds.",
|
384 | "default": false
|
385 | },
|
386 | "ngswConfigPath": {
|
387 | "type": "string",
|
388 | "description": "Path to ngsw-config.json."
|
389 | },
|
390 | "index": {
|
391 | "description": "Configures the generation of the application's HTML index.",
|
392 | "oneOf": [
|
393 | {
|
394 | "type": "string",
|
395 | "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
|
396 | },
|
397 | {
|
398 | "type": "object",
|
399 | "description": "",
|
400 | "properties": {
|
401 | "input": {
|
402 | "type": "string",
|
403 | "minLength": 1,
|
404 | "description": "The path of a file to use for the application's generated HTML index."
|
405 | },
|
406 | "output": {
|
407 | "type": "string",
|
408 | "minLength": 1,
|
409 | "default": "index.html",
|
410 | "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
|
411 | }
|
412 | },
|
413 | "required": [
|
414 | "input"
|
415 | ]
|
416 | }
|
417 | ]
|
418 | },
|
419 | "statsJson": {
|
420 | "type": "boolean",
|
421 | "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
|
422 | "default": false
|
423 | },
|
424 | "budgets": {
|
425 | "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
|
426 | "type": "array",
|
427 | "items": {
|
428 | "$ref": "#/definitions/budget"
|
429 | },
|
430 | "default": []
|
431 | },
|
432 | "webWorkerTsConfig": {
|
433 | "type": "string",
|
434 | "description": "TypeScript configuration for Web Worker modules."
|
435 | },
|
436 | "crossOrigin": {
|
437 | "type": "string",
|
438 | "description": "Define the crossorigin attribute setting of elements that provide CORS support.",
|
439 | "default": "none",
|
440 | "enum": [
|
441 | "none",
|
442 | "anonymous",
|
443 | "use-credentials"
|
444 | ]
|
445 | },
|
446 | "allowedCommonJsDependencies": {
|
447 | "description": "A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use `'*'` to allow all.",
|
448 | "type": "array",
|
449 | "items": {
|
450 | "type": "string"
|
451 | },
|
452 | "default": []
|
453 | },
|
454 | "customWebpackConfig": {
|
455 | "description": "Custom webpack configuration",
|
456 | "default": false,
|
457 | "oneOf": [
|
458 | {
|
459 | "type": "object",
|
460 | "properties": {
|
461 | "path": {
|
462 | "type": "string",
|
463 | "description": "Path to the custom webpack configuration file"
|
464 | },
|
465 | "mergeRules": {
|
466 | "type": "object",
|
467 | "description": "Merge rules as described here: https://github.com/survivejs/webpack-merge#mergewithrules"
|
468 | },
|
469 | "replaceDuplicatePlugins": {
|
470 | "type": "boolean",
|
471 | "description": "Flag that indicates whether to replace duplicate webpack plugins or not"
|
472 | },
|
473 | "verbose": {
|
474 | "type": "object",
|
475 | "description": "Determines whether to log configuration properties into a console",
|
476 | "properties": {
|
477 | "properties": {
|
478 | "description": "A list of properties to log into a console, for instance, `['plugins', 'mode', 'entry']`",
|
479 | "type": "array",
|
480 | "items": {
|
481 | "type": "string"
|
482 | }
|
483 | },
|
484 | "serializationDepth": {
|
485 | "type": "number",
|
486 | "description": "The number of times to recurse the object while formatting"
|
487 | }
|
488 | }
|
489 | }
|
490 | }
|
491 | },
|
492 | {
|
493 | "type": "boolean"
|
494 | }
|
495 | ]
|
496 | },
|
497 | "indexTransform": {
|
498 | "type": "string",
|
499 | "description": "Path to the file with index.html transform function"
|
500 | }
|
501 | },
|
502 | "additionalProperties": false,
|
503 | "required": [
|
504 | "outputPath",
|
505 | "index",
|
506 | "main",
|
507 | "tsConfig"
|
508 | ],
|
509 | "definitions": {
|
510 | "assetPattern": {
|
511 | "oneOf": [
|
512 | {
|
513 | "type": "object",
|
514 | "properties": {
|
515 | "followSymlinks": {
|
516 | "type": "boolean",
|
517 | "default": false,
|
518 | "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
519 | },
|
520 | "glob": {
|
521 | "type": "string",
|
522 | "description": "The pattern to match."
|
523 | },
|
524 | "input": {
|
525 | "type": "string",
|
526 | "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
527 | },
|
528 | "ignore": {
|
529 | "description": "An array of globs to ignore.",
|
530 | "type": "array",
|
531 | "items": {
|
532 | "type": "string"
|
533 | }
|
534 | },
|
535 | "output": {
|
536 | "type": "string",
|
537 | "default": "",
|
538 | "description": "Absolute path within the output."
|
539 | }
|
540 | },
|
541 | "additionalProperties": false,
|
542 | "required": [
|
543 | "glob",
|
544 | "input"
|
545 | ]
|
546 | },
|
547 | {
|
548 | "type": "string"
|
549 | }
|
550 | ]
|
551 | },
|
552 | "fileReplacement": {
|
553 | "oneOf": [
|
554 | {
|
555 | "type": "object",
|
556 | "properties": {
|
557 | "src": {
|
558 | "type": "string",
|
559 | "pattern": "\\.(([cm]?[jt])sx?|json)$"
|
560 | },
|
561 | "replaceWith": {
|
562 | "type": "string",
|
563 | "pattern": "\\.(([cm]?[jt])sx?|json)$"
|
564 | }
|
565 | },
|
566 | "additionalProperties": false,
|
567 | "required": [
|
568 | "src",
|
569 | "replaceWith"
|
570 | ]
|
571 | },
|
572 | {
|
573 | "type": "object",
|
574 | "properties": {
|
575 | "replace": {
|
576 | "type": "string",
|
577 | "pattern": "\\.(([cm]?[jt])sx?|json)$"
|
578 | },
|
579 | "with": {
|
580 | "type": "string",
|
581 | "pattern": "\\.(([cm]?[jt])sx?|json)$"
|
582 | }
|
583 | },
|
584 | "additionalProperties": false,
|
585 | "required": [
|
586 | "replace",
|
587 | "with"
|
588 | ]
|
589 | }
|
590 | ]
|
591 | },
|
592 | "budget": {
|
593 | "type": "object",
|
594 | "properties": {
|
595 | "type": {
|
596 | "type": "string",
|
597 | "description": "The type of budget.",
|
598 | "enum": [
|
599 | "all",
|
600 | "allScript",
|
601 | "any",
|
602 | "anyScript",
|
603 | "anyComponentStyle",
|
604 | "bundle",
|
605 | "initial"
|
606 | ]
|
607 | },
|
608 | "name": {
|
609 | "type": "string",
|
610 | "description": "The name of the bundle."
|
611 | },
|
612 | "baseline": {
|
613 | "type": "string",
|
614 | "description": "The baseline size for comparison."
|
615 | },
|
616 | "maximumWarning": {
|
617 | "type": "string",
|
618 | "description": "The maximum threshold for warning relative to the baseline."
|
619 | },
|
620 | "maximumError": {
|
621 | "type": "string",
|
622 | "description": "The maximum threshold for error relative to the baseline."
|
623 | },
|
624 | "minimumWarning": {
|
625 | "type": "string",
|
626 | "description": "The minimum threshold for warning relative to the baseline."
|
627 | },
|
628 | "minimumError": {
|
629 | "type": "string",
|
630 | "description": "The minimum threshold for error relative to the baseline."
|
631 | },
|
632 | "warning": {
|
633 | "type": "string",
|
634 | "description": "The threshold for warning relative to the baseline (min & max)."
|
635 | },
|
636 | "error": {
|
637 | "type": "string",
|
638 | "description": "The threshold for error relative to the baseline (min & max)."
|
639 | }
|
640 | },
|
641 | "additionalProperties": false,
|
642 | "required": [
|
643 | "type"
|
644 | ]
|
645 | }
|
646 | },
|
647 | "$id": "BuildCustomWebpackBrowserSchema"
|
648 | } |
\ | No newline at end of file |