{
	"definitions": {
		"mode": {
			"type": "string",
			"enum": [
				"dist",
				"dev",
				"unit",
				"functional"
			]
		},
		"target": {
			"type": "string",
			"enum": [
				"web",
				"electron"
			]
		},
		"watch": {
			"type": "boolean"
		},
		"watchExtraFiles": {
			"type": "array",
			"items": { "type": "string" },
			"description": "A collection of globs to be watched for changes"
		},
		"serve": {
			"type": "boolean"
		},
		"port": {
			"type": "number"
		},
		"legacy": {
			"type": "boolean"
		},
		"features": {
			"type": "object",
			"patternProperties": {
				"^.*$": {
					"type": ["boolean", "string", "number"]
				}
			}
		},
		"singleBundle": {
			"type": "boolean"
		},
		"omitHash": {
			"type": "boolean"
		},
		"bundles": {
			"type": "object",
			"patternProperties": {
				"^.*$": {
					"type": "array"
				}
			}
		},
		"cldrPaths" : {
			"type": "array",
			"items": { "type": "string" }
		},
		"base" : {
			"type": "string"
		},
		"experimental": {
			"additionalProperties": false,
			"properties": {
				"speed": {
					"type": "boolean"
				}
			}
		},
		"electron": {
			"properties": {
				"browser": {
					"type": "object"
				}
			}
		},
		"build-time-render": {
			"additionalProperties": false,
			"properties": {
				"root": {
					"type": "string"
				},
				"paths": {
					"type": "array",
					"items": {
						"type": ["object", "string"],
						"required": ["path"],
						"properties": {
							"path" : {
								"type": "string"
							},
							"match" : {
								"type": "array",
								"items": {
									"type": "string"
								}
							},
							"static": {
								"type": "boolean"
							},
							"exclude": {
								"type": "boolean"
							},
							"output" : {
								"type": "string"
							}
						}
					}
				},
				"static": {
					"type": "boolean"
				},
				"puppeteerOptions": {
					"type": "object"
				},
				"cache": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" },
						"excludes": {
							"type": "array",
							"items": {
								"type": "string"
							}
						}
					},
					"additionalProperties": false
				},
				"renderer": {
					"type": "string",
					"enum": [
						"jsdom", "puppeteer"
					]
				},
				"discoverPaths": {
					"type": "boolean"
				},
				"writeHtml": {
					"type": "boolean"
				},
				"writeCss": {
					"type": "boolean"
				}
			}
		},
		"compression": {
			"type": "array",
			"items": {
				"type": "string",
				"enum": [
					"brotli",
					"gzip"
				]
			}
		},
		"imageOptimizationOptions": {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"mozjpeg": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				},
				"optipng": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				},
				"pngquant": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				},
				"svgo": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				},
				"gifsicle": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				},
				"webp": {
					"type": "object",
					"properties": {
						"enabled": { "type": "boolean" }
					},
					"additionalProperties": true
				}
			}
		},
		"imageOptimizationFlag": {
			"type": "boolean"
		},
		"externals" : {
			"type": "object",
			"additionalProperties": false,
			"properties" : {
				"outputPath": {
					"type": "string"
				},
				"dependencies": {
					"type": "array",
					"items" : {
						"type": ["object", "string"],
						"required": ["from"],
						"properties": {
							"from" : {
								"type": "string"
							},
							"to" : {
								"type": "string"
							},
							"name" : {
								"type": "string"
							},
							"inject" : {
								"type": ["string", "boolean", "array"]
							},
							"type": {
								"type" : "string",
								"enum": [
									"root", "umd", "amd", "commonjs", "commonjs2"
								]
							}
						}
					}
				}
			}
		},
		"locale": {
			"type": "string"
		},
		"pwa" : {
			"type": "object",
			"additionalProperties": false,
			"properties": {
				"manifest" : {
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"background_color": {
							"type": "string"
						},
						"description": {
							"type": "string"
						},
						"dir": {
							"type": "string",
							"enum": ["auto", "ltr", "rtl"]
						},
						"display": {
							"type": "string",
							"enum": ["browser", "fullscreen", "minimal-ui", "standalone"]
						},
						"icons": {
							"type": "array",
							"items": {
								"type": "object",
								"required": ["sizes", "src"],
								"properties": {
									"sizes": {
										"type": ["string", "array"],
										"items": {
											"type": "integer"
										}
									},
									"src": {
										"type": "string"
									},
									"type": {
										"type": "string"
									}
								}
							}
						},
						"lang": {
							"type": "string"
						},
						"name": {
							"type": "string"
						},
						"orientation": {
							"type": "string",
							"enum": [
								"any",
								"landscape",
								"landscape-primary",
								"landscape-secondary",
								"natural",
								"portrait",
								"portrait-primary",
								"portrait-secondary"
							]
						},
						"prefer_related_applications": {
							"type": "boolean"
						},
						"related_applications": {
							"type": "array",
							"items": {
								"type": "object",
								"required": ["platform"],
								"properties": {
									"platform": {
										"type": "string"
									},
									"url": {
										"type": "string"
									},
									"id": {
										"type": "string"
									}
								}
							}
						},
						"scope": {
							"type": "string"
						},
						"short_name": {
							"type": "string"
						},
						"start_url": {
							"type": "string"
						},
						"theme_color": {
							"type": "string"
						}
					}
				},
				"serviceWorker" : {
					"type": "object",
					"additionalProperties": false,
					"properties": {
						"bundles": {
							"type": "array",
							"items": { "type": "string" }
						},
						"cachePrefix": {
							"type": "string"
						},
						"clientsClaim": {
							"type": "boolean"
						},
						"excludeBundles": {
							"type": "array",
							"items": { "type": "string" }
						},
						"importScripts": {
							"type": "array",
							"items": { "type": "string" }
						},
						"precache": {
							"type": "object",
							"properties" : {
								"baseDir": {
									"type": "string"
								},
								"ignore": {
									"type": "array",
									"items": { "type": "string" }
								},
								"include": {
									"type": ["string", "array"]
								},
								"index": {
									"type": "string"
								},
								"maxCacheSize": {
									"type": "number"
								},
								"strict": {
									"type": "boolean"
								},
								"symlinks": {
									"type": "boolean"
								}
							}
						},
						"routes": {
							"type": "array",
							"items": {
								"type": "object",
								"additionalProperties": false,
								"properties": {
									"cacheName": {
										"type": "string"
									},
									"urlPattern": {
										"type": "string"
									},
									"strategy": {
										"type": "string",
										"enum": [
											"networkFirst",
											"cacheFirst",
											"networkOnly",
											"staleWhileRevalidate"
										]
									},
									"expiration": {
										"type": "object",
										"additionalProperties": false,
										"properties": {
											"maxEntries": {
												"type": "number"
											},
											"maxAgeSeconds": {
												"type": "number"
											}
										}
									}
								}
							}
						},
						"skipWaiting": {
							"type": "boolean"
						}
					}
				}
			}
		},
		"supportedLocales": {
			"type": "array",
			"items": { "type": "string" }
		},
		"proxy": {
			"type": "object",
			"patternProperties": {
				"^.*$": {
					"type": ["object", "string"],
					"properties": {
						"target": {
							"type": "string"
						},
						"changeOrigin": {
							"type": "boolean"
						},
						"ws": {
							"type": "boolean"
						},
						"pathRewrite": {
							"patternProperties": {
								"^.*$": {
									"type": "string"
								}
							}
						}
					}
				}
			}
		}
	},
	"type": "object",
	"additionalProperties": false,
	"properties": {
		"mode": {
			"$ref": "#/definitions/mode"
		},
		"m": {
			"$ref": "#/definitions/mode"
		},
		"target": {
			"$ref": "#/definitions/target"
		},
		"t": {
			"$ref": "#/definitions/target"
		},
		"watch": {
			"$ref": "#/definitions/watch"
		},
		"w": {
			"$ref": "#/definitions/watch"
		},
		"serve" : {
			"$ref": "#/definitions/serve"
		},
		"s": {
			"$ref": "#/definitions/serve"
		},
		"port" : {
			"$ref": "#/definitions/port"
		},
		"p": {
			"$ref": "#/definitions/port"
		},
		"legacy": {
			"$ref": "#/definitions/legacy"
		},
		"l": {
			"$ref": "#/definitions/legacy"
		},
		"features": {
			"$ref": "#/definitions/features"
		},
		"f": {
			"$ref": "#/definitions/features"
		},
		"singleBundle": {
			"$ref": "#/definitions/singleBundle"
		},
		"omitHash": {
			"$ref": "#/definitions/omitHash"
		},
		"bundles": {
			"$ref": "#/definitions/bundles"
		},
		"cldrPaths" : {
			"$ref": "#/definitions/cldrPaths"
		},
		"base" : {
			"$ref": "#/definitions/base"
		},
		"build-time-render": {
			"$ref": "#/definitions/build-time-render"
		},
		"compression": {
			"$ref": "#/definitions/compression"
		},
		"externals" : {
			"$ref": "#/definitions/externals"
		},
		"locale": {
			"$ref": "#/definitions/locale"
		},
		"pwa" : {
			"$ref": "#/definitions/pwa"
		},
		"supportedLocales": {
			"$ref": "#/definitions/supportedLocales"
		},
		"proxy": {
			"$ref": "#/definitions/proxy"
		},
		"experimental": {
			"$ref": "#/definitions/experimental"
		},
		"watchExtraFiles": {
			"$ref": "#/definitions/watchExtraFiles"
		},
		"imageOptimization": {
			"anyOf": [
				{ "$ref": "#/definitions/imageOptimizationOptions" },
				{ "$ref": "#/definitions/imageOptimizationFlag" }
			]
		},
		"electron": {
			"$ref": "#/definitions/electron"
		}
	}
}
