UNPKG

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