@nx/angular 16.6.0-beta.3 → 16.6.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/executors.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from './src/builders/webpack-server/webpack-server.impl';
6
6
  export * from './src/executors/delegate-build/delegate-build.impl';
7
7
  export * from './src/executors/ng-packagr-lite/ng-packagr-lite.impl';
8
8
  export * from './src/executors/package/package.impl';
9
+ export * from './src/executors/browser-esbuild/browser-esbuild.impl';
package/executors.js CHANGED
@@ -9,3 +9,4 @@ tslib_1.__exportStar(require("./src/builders/webpack-server/webpack-server.impl"
9
9
  tslib_1.__exportStar(require("./src/executors/delegate-build/delegate-build.impl"), exports);
10
10
  tslib_1.__exportStar(require("./src/executors/ng-packagr-lite/ng-packagr-lite.impl"), exports);
11
11
  tslib_1.__exportStar(require("./src/executors/package/package.impl"), exports);
12
+ tslib_1.__exportStar(require("./src/executors/browser-esbuild/browser-esbuild.impl"), exports);
package/executors.json CHANGED
@@ -14,6 +14,11 @@
14
14
  "implementation": "./src/executors/package/package.impl",
15
15
  "schema": "./src/executors/package/schema.json",
16
16
  "description": "Builds and packages an Angular library producing an output following the Angular Package Format (APF) to be distributed as an NPM package.\nThis executor is similar to the `@angular-devkit/build-angular:ng-packagr` with additional support for incremental builds."
17
+ },
18
+ "browser-esbuild": {
19
+ "implementation": "./src/executors/browser-esbuild/browser-esbuild.impl",
20
+ "schema": "./src/executors/browser-esbuild/schema.json",
21
+ "description": "Builds your application with esbuild and adds support for incremental builds."
17
22
  }
18
23
  },
19
24
  "builders": {
@@ -56,6 +61,11 @@
56
61
  "implementation": "./src/builders/module-federation-dev-ssr/module-federation-dev-ssr.impl",
57
62
  "schema": "./src/builders/module-federation-dev-ssr/schema.json",
58
63
  "description": "The module-federation-dev-ssr executor is reserved exclusively for use with host Module Federation applications that use SSR. It allows the user to specify which remote applications should be served with the host."
64
+ },
65
+ "browser-esbuild": {
66
+ "implementation": "./src/executors/browser-esbuild/compat",
67
+ "schema": "./src/executors/browser-esbuild/schema.json",
68
+ "description": "Builds your application with esbuild and adds support for incremental builds."
59
69
  }
60
70
  }
61
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "16.6.0-beta.3",
3
+ "version": "16.6.0-beta.4",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -66,14 +66,14 @@
66
66
  "migrations": "./migrations.json"
67
67
  },
68
68
  "dependencies": {
69
- "@nrwl/angular": "16.6.0-beta.3",
70
- "@nx/cypress": "16.6.0-beta.3",
71
- "@nx/devkit": "16.6.0-beta.3",
72
- "@nx/jest": "16.6.0-beta.3",
73
- "@nx/js": "16.6.0-beta.3",
74
- "@nx/linter": "16.6.0-beta.3",
75
- "@nx/webpack": "16.6.0-beta.3",
76
- "@nx/workspace": "16.6.0-beta.3",
69
+ "@nrwl/angular": "16.6.0-beta.4",
70
+ "@nx/cypress": "16.6.0-beta.4",
71
+ "@nx/devkit": "16.6.0-beta.4",
72
+ "@nx/jest": "16.6.0-beta.4",
73
+ "@nx/js": "16.6.0-beta.4",
74
+ "@nx/linter": "16.6.0-beta.4",
75
+ "@nx/webpack": "16.6.0-beta.4",
76
+ "@nx/workspace": "16.6.0-beta.4",
77
77
  "@phenomnomnominal/tsquery": "~5.0.1",
78
78
  "@typescript-eslint/type-utils": "^5.36.1",
79
79
  "chalk": "^4.1.0",
@@ -95,6 +95,7 @@
95
95
  "@angular-devkit/schematics": ">= 14.0.0 < 17.0.0",
96
96
  "@nguniversal/builders": ">= 14.0.0 < 17.0.0",
97
97
  "@schematics/angular": ">= 14.0.0 < 17.0.0",
98
+ "esbuild": "^0.17.5",
98
99
  "rxjs": "^6.5.3 || ^7.5.0"
99
100
  },
100
101
  "peerDependenciesMeta": {
@@ -108,5 +109,5 @@
108
109
  "module": "fesm2022/nx-angular.mjs",
109
110
  "typings": "index.d.ts",
110
111
  "sideEffects": false,
111
- "gitHead": "cd8c61d7a3b8ab9bc7bab068f5ca49bbf14abbf5"
112
+ "gitHead": "b1a9ae7ce76697019b26ec9a172005840cca8da6"
112
113
  }
@@ -0,0 +1,10 @@
1
+ import { type EsBuildSchema } from './schema';
2
+ import { type ExecutorContext } from '@nx/devkit';
3
+ import { type OutputFile } from 'esbuild';
4
+ export default function esbuildExecutor(options: EsBuildSchema, context: ExecutorContext): AsyncGenerator<import("@angular-devkit/core").JsonObject & import("@angular-devkit/architect/src/output-schema").Schema & {
5
+ outputFiles?: OutputFile[];
6
+ assetFiles?: {
7
+ source: string;
8
+ destination: string;
9
+ }[];
10
+ }, any, undefined>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const validate_options_1 = require("./lib/validate-options");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const buildable_libs_1 = require("./lib/buildable-libs");
7
+ const ngcli_adapter_1 = require("nx/src/adapter/ngcli-adapter");
8
+ function esbuildExecutor(options, context) {
9
+ var _a;
10
+ return tslib_1.__asyncGenerator(this, arguments, function* esbuildExecutor_1() {
11
+ (0, validate_options_1.validateOptions)(options);
12
+ (_a = options.buildLibsFromSource) !== null && _a !== void 0 ? _a : (options.buildLibsFromSource = true);
13
+ const { buildLibsFromSource } = options, delegateExecutorOptions = tslib_1.__rest(options, ["buildLibsFromSource"]);
14
+ let dependencies;
15
+ let projectGraph = context.projectGraph;
16
+ if (!buildLibsFromSource) {
17
+ projectGraph = projectGraph !== null && projectGraph !== void 0 ? projectGraph : (0, devkit_1.readCachedProjectGraph)();
18
+ const { tsConfigPath, dependencies: foundDependencies } = (0, buildable_libs_1.createTmpTsConfigForBuildableLibs)(delegateExecutorOptions.tsConfig, context, { projectGraph });
19
+ dependencies = foundDependencies;
20
+ delegateExecutorOptions.tsConfig = tsConfigPath;
21
+ }
22
+ const { buildEsbuildBrowser } = yield tslib_1.__await(Promise.resolve().then(() => require('@angular-devkit/build-angular/src/builders/browser-esbuild/index')));
23
+ const builderContext = yield tslib_1.__await((0, ngcli_adapter_1.createBuilderContext)({
24
+ builderName: 'browser-esbuild',
25
+ description: 'Build a browser application',
26
+ optionSchema: yield tslib_1.__await(Promise.resolve().then(() => require('@angular-devkit/build-angular/src/builders/browser-esbuild/schema.json'))),
27
+ }, context));
28
+ return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(buildEsbuildBrowser(delegateExecutorOptions, builderContext)))));
29
+ });
30
+ }
31
+ exports.default = esbuildExecutor;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const browser_esbuild_impl_1 = require("./browser-esbuild.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(browser_esbuild_impl_1.default);
@@ -0,0 +1,9 @@
1
+ import { DependentBuildableProjectNode } from '@nx/js/src/utils/buildable-libs-utils';
2
+ import { type ExecutorContext, type ProjectGraph } from '@nx/devkit';
3
+ export declare function createTmpTsConfigForBuildableLibs(tsConfigPath: string, context: ExecutorContext, options?: {
4
+ projectGraph?: ProjectGraph;
5
+ target?: string;
6
+ }): {
7
+ tsConfigPath: string;
8
+ dependencies: DependentBuildableProjectNode[];
9
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTmpTsConfigForBuildableLibs = void 0;
4
+ const buildable_libs_utils_1 = require("@nx/js/src/utils/buildable-libs-utils");
5
+ const path_1 = require("path");
6
+ const devkit_1 = require("@nx/devkit");
7
+ function createTmpTsConfigForBuildableLibs(tsConfigPath, context, options) {
8
+ var _a, _b;
9
+ let dependencies;
10
+ const result = (0, buildable_libs_utils_1.calculateProjectDependencies)((_a = options === null || options === void 0 ? void 0 : options.projectGraph) !== null && _a !== void 0 ? _a : (0, devkit_1.readCachedProjectGraph)(), context.root, context.projectName, (_b = options === null || options === void 0 ? void 0 : options.target) !== null && _b !== void 0 ? _b : context.targetName, context.configurationName);
11
+ dependencies = result.dependencies;
12
+ const tmpTsConfigPath = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.root, tsConfigPath), context.root, result.target.data.root, dependencies);
13
+ process.env.NX_TSCONFIG_PATH = tmpTsConfigPath;
14
+ // Angular EsBuild Builder appends the workspaceRoot to the config path, so remove it.
15
+ const tmpTsConfigPathWithoutWorkspaceRoot = tmpTsConfigPath.replace(context.root, '');
16
+ return { tsConfigPath: tmpTsConfigPathWithoutWorkspaceRoot, dependencies };
17
+ }
18
+ exports.createTmpTsConfigForBuildableLibs = createTmpTsConfigForBuildableLibs;
@@ -0,0 +1,2 @@
1
+ import { type EsBuildSchema } from '../schema';
2
+ export declare function validateOptions(options: EsBuildSchema): void;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateOptions = void 0;
4
+ const angular_version_utils_1 = require("../../utilities/angular-version-utils");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const path_1 = require("path");
7
+ function validateOptions(options) {
8
+ const angularVersionInfo = (0, angular_version_utils_1.getInstalledAngularVersionInfo)();
9
+ validatePolyfills(options, angularVersionInfo);
10
+ validateStyles(options, angularVersionInfo);
11
+ }
12
+ exports.validateOptions = validateOptions;
13
+ function validatePolyfills(options, { major, version }) {
14
+ if (major < 15 && Array.isArray(options.polyfills)) {
15
+ throw new Error((0, devkit_1.stripIndents) `The array syntax for the "polyfills" option is supported from Angular >= 15.0.0. You are currently using "${version}".
16
+ You can resolve this error by removing the "polyfills" option, setting it to a string value or migrating to Angular 15.0.0.`);
17
+ }
18
+ }
19
+ function validateStyles(options, { major, version }) {
20
+ if (!options.styles || !options.styles.length) {
21
+ return;
22
+ }
23
+ if (major < 15) {
24
+ return;
25
+ }
26
+ const stylusFiles = [];
27
+ options.styles.forEach((style) => {
28
+ const styleFile = typeof style === 'string' ? style : style.input;
29
+ if ((0, path_1.extname)(styleFile) === '.styl') {
30
+ stylusFiles.push(styleFile);
31
+ }
32
+ });
33
+ if (stylusFiles.length) {
34
+ throw new Error((0, devkit_1.stripIndents) `Stylus is not supported since Angular v15. You're currently using "${version}".
35
+ You have the "styles" option with the following file(s) using the ".styl" extension: ${stylusFiles
36
+ .map((x) => `"${x}"`)
37
+ .join(', ')}.
38
+ Make sure to convert them to a supported extension (".css", ".scss", ".sass", ".less").`);
39
+ }
40
+ }
@@ -0,0 +1,5 @@
1
+ import { Schema } from '@angular-devkit/build-angular/src/builders/browser-esbuild/schema';
2
+
3
+ export interface EsBuildSchema extends Schema {
4
+ buildLibsFromSource?: boolean;
5
+ }
@@ -0,0 +1,554 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "title": "Schema for Nx ESBuild Executor",
4
+ "description": "Nx ESBuild Executor supporting Incremental Builds.",
5
+ "outputCapture": "direct-nodejs",
6
+ "type": "object",
7
+ "properties": {
8
+ "assets": {
9
+ "type": "array",
10
+ "description": "List of static application assets.",
11
+ "default": [],
12
+ "items": {
13
+ "$ref": "#/definitions/assetPattern"
14
+ }
15
+ },
16
+ "main": {
17
+ "type": "string",
18
+ "description": "The full path for the main entry point to the app, relative to the current workspace."
19
+ },
20
+ "polyfills": {
21
+ "description": "Polyfills to be included in the build.",
22
+ "oneOf": [
23
+ {
24
+ "type": "array",
25
+ "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'.",
26
+ "items": {
27
+ "type": "string",
28
+ "uniqueItems": true
29
+ },
30
+ "default": []
31
+ },
32
+ {
33
+ "type": "string",
34
+ "description": "The full path for the polyfills file, relative to the current workspace or a module specifier. Example: 'zone.js'."
35
+ }
36
+ ]
37
+ },
38
+ "tsConfig": {
39
+ "type": "string",
40
+ "description": "The full path for the TypeScript configuration file, relative to the current workspace."
41
+ },
42
+ "scripts": {
43
+ "description": "Global scripts to be included in the build.",
44
+ "type": "array",
45
+ "default": [],
46
+ "items": {
47
+ "oneOf": [
48
+ {
49
+ "type": "object",
50
+ "properties": {
51
+ "input": {
52
+ "type": "string",
53
+ "description": "The file to include.",
54
+ "pattern": "\\.[cm]?jsx?$"
55
+ },
56
+ "bundleName": {
57
+ "type": "string",
58
+ "pattern": "^[\\w\\-.]*$",
59
+ "description": "The bundle name for this extra entry point."
60
+ },
61
+ "inject": {
62
+ "type": "boolean",
63
+ "description": "If the bundle will be referenced in the HTML file.",
64
+ "default": true
65
+ }
66
+ },
67
+ "additionalProperties": false,
68
+ "required": ["input"]
69
+ },
70
+ {
71
+ "type": "string",
72
+ "description": "The JavaScript/TypeScript file or package containing the file to include."
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ "styles": {
78
+ "description": "Global styles to be included in the build.",
79
+ "type": "array",
80
+ "default": [],
81
+ "items": {
82
+ "oneOf": [
83
+ {
84
+ "type": "object",
85
+ "properties": {
86
+ "input": {
87
+ "type": "string",
88
+ "description": "The file to include.",
89
+ "pattern": "\\.(?:css|scss|sass|less)$"
90
+ },
91
+ "bundleName": {
92
+ "type": "string",
93
+ "pattern": "^[\\w\\-.]*$",
94
+ "description": "The bundle name for this extra entry point."
95
+ },
96
+ "inject": {
97
+ "type": "boolean",
98
+ "description": "If the bundle will be referenced in the HTML file.",
99
+ "default": true
100
+ }
101
+ },
102
+ "additionalProperties": false,
103
+ "required": ["input"]
104
+ },
105
+ {
106
+ "type": "string",
107
+ "description": "The file to include.",
108
+ "pattern": "\\.(?:css|scss|sass|less)$"
109
+ }
110
+ ]
111
+ }
112
+ },
113
+ "inlineStyleLanguage": {
114
+ "description": "The stylesheet language to use for the application's inline component styles.",
115
+ "type": "string",
116
+ "default": "css",
117
+ "enum": ["css", "less", "sass", "scss"]
118
+ },
119
+ "stylePreprocessorOptions": {
120
+ "description": "Options to pass to style preprocessors.",
121
+ "type": "object",
122
+ "properties": {
123
+ "includePaths": {
124
+ "description": "Paths to include. Paths will be resolved to workspace root.",
125
+ "type": "array",
126
+ "items": {
127
+ "type": "string"
128
+ },
129
+ "default": []
130
+ }
131
+ },
132
+ "additionalProperties": false
133
+ },
134
+ "externalDependencies": {
135
+ "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string"
139
+ },
140
+ "default": []
141
+ },
142
+ "optimization": {
143
+ "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.",
144
+ "default": true,
145
+ "x-user-analytics": "ep.ng_optimization",
146
+ "oneOf": [
147
+ {
148
+ "type": "object",
149
+ "properties": {
150
+ "scripts": {
151
+ "type": "boolean",
152
+ "description": "Enables optimization of the scripts output.",
153
+ "default": true
154
+ },
155
+ "styles": {
156
+ "description": "Enables optimization of the styles output.",
157
+ "default": true,
158
+ "oneOf": [
159
+ {
160
+ "type": "object",
161
+ "properties": {
162
+ "minify": {
163
+ "type": "boolean",
164
+ "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
165
+ "default": true
166
+ },
167
+ "inlineCritical": {
168
+ "type": "boolean",
169
+ "description": "Extract and inline critical CSS definitions to improve first paint time.",
170
+ "default": true
171
+ }
172
+ },
173
+ "additionalProperties": false
174
+ },
175
+ {
176
+ "type": "boolean"
177
+ }
178
+ ]
179
+ },
180
+ "fonts": {
181
+ "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
182
+ "default": true,
183
+ "oneOf": [
184
+ {
185
+ "type": "object",
186
+ "properties": {
187
+ "inline": {
188
+ "type": "boolean",
189
+ "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.",
190
+ "default": true
191
+ }
192
+ },
193
+ "additionalProperties": false
194
+ },
195
+ {
196
+ "type": "boolean"
197
+ }
198
+ ]
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ {
204
+ "type": "boolean"
205
+ }
206
+ ]
207
+ },
208
+ "fileReplacements": {
209
+ "description": "Replace compilation source files with other compilation source files in the build.",
210
+ "type": "array",
211
+ "items": {
212
+ "$ref": "#/definitions/fileReplacement"
213
+ },
214
+ "default": []
215
+ },
216
+ "outputPath": {
217
+ "type": "string",
218
+ "description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
219
+ },
220
+ "resourcesOutputPath": {
221
+ "type": "string",
222
+ "description": "The path where style resources will be placed, relative to outputPath."
223
+ },
224
+ "aot": {
225
+ "type": "boolean",
226
+ "description": "Build using Ahead of Time compilation.",
227
+ "x-user-analytics": "ep.ng_aot",
228
+ "default": true
229
+ },
230
+ "sourceMap": {
231
+ "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
232
+ "default": false,
233
+ "oneOf": [
234
+ {
235
+ "type": "object",
236
+ "properties": {
237
+ "scripts": {
238
+ "type": "boolean",
239
+ "description": "Output source maps for all scripts.",
240
+ "default": true
241
+ },
242
+ "styles": {
243
+ "type": "boolean",
244
+ "description": "Output source maps for all styles.",
245
+ "default": true
246
+ },
247
+ "hidden": {
248
+ "type": "boolean",
249
+ "description": "Output source maps used for error reporting tools.",
250
+ "default": false
251
+ },
252
+ "vendor": {
253
+ "type": "boolean",
254
+ "description": "Resolve vendor packages source maps.",
255
+ "default": false
256
+ }
257
+ },
258
+ "additionalProperties": false
259
+ },
260
+ {
261
+ "type": "boolean"
262
+ }
263
+ ]
264
+ },
265
+ "vendorChunk": {
266
+ "type": "boolean",
267
+ "description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time.",
268
+ "default": false
269
+ },
270
+ "commonChunk": {
271
+ "type": "boolean",
272
+ "description": "Generate a seperate bundle containing code used across multiple bundles.",
273
+ "default": true
274
+ },
275
+ "baseHref": {
276
+ "type": "string",
277
+ "description": "Base url for the application being built."
278
+ },
279
+ "deployUrl": {
280
+ "type": "string",
281
+ "description": "URL where files will be deployed.",
282
+ "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."
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": ["warning", "error", "ignore"],
298
+ "default": "warning"
299
+ },
300
+ "i18nDuplicateTranslation": {
301
+ "type": "string",
302
+ "description": "How to handle duplicate translations for i18n.",
303
+ "enum": ["warning", "error", "ignore"],
304
+ "default": "warning"
305
+ },
306
+ "localize": {
307
+ "description": "Translate the bundles in one or more locales.",
308
+ "oneOf": [
309
+ {
310
+ "type": "boolean",
311
+ "description": "Translate all locales."
312
+ },
313
+ {
314
+ "type": "array",
315
+ "description": "List of locales ID's to translate.",
316
+ "minItems": 1,
317
+ "items": {
318
+ "type": "string",
319
+ "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})+)?$"
320
+ }
321
+ }
322
+ ]
323
+ },
324
+ "watch": {
325
+ "type": "boolean",
326
+ "description": "Run build when files change.",
327
+ "default": false
328
+ },
329
+ "outputHashing": {
330
+ "type": "string",
331
+ "description": "Define the output filename cache-busting hashing mode.",
332
+ "default": "none",
333
+ "enum": ["none", "all", "media", "bundles"]
334
+ },
335
+ "poll": {
336
+ "type": "number",
337
+ "description": "Enable and define the file watching poll time period in milliseconds."
338
+ },
339
+ "deleteOutputPath": {
340
+ "type": "boolean",
341
+ "description": "Delete the output path before building.",
342
+ "default": true
343
+ },
344
+ "preserveSymlinks": {
345
+ "type": "boolean",
346
+ "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
347
+ },
348
+ "extractLicenses": {
349
+ "type": "boolean",
350
+ "description": "Extract all licenses in a separate file.",
351
+ "default": true
352
+ },
353
+ "buildOptimizer": {
354
+ "type": "boolean",
355
+ "description": "Enables advanced build optimizations when using the 'aot' option.",
356
+ "default": true
357
+ },
358
+ "namedChunks": {
359
+ "type": "boolean",
360
+ "description": "Use file name for lazy loaded chunks.",
361
+ "default": false
362
+ },
363
+ "subresourceIntegrity": {
364
+ "type": "boolean",
365
+ "description": "Enables the use of subresource integrity validation.",
366
+ "default": false
367
+ },
368
+ "serviceWorker": {
369
+ "type": "boolean",
370
+ "description": "Generates a service worker config for production builds.",
371
+ "default": false
372
+ },
373
+ "ngswConfigPath": {
374
+ "type": "string",
375
+ "description": "Path to ngsw-config.json."
376
+ },
377
+ "index": {
378
+ "description": "Configures the generation of the application's HTML index.",
379
+ "oneOf": [
380
+ {
381
+ "type": "string",
382
+ "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."
383
+ },
384
+ {
385
+ "type": "object",
386
+ "description": "",
387
+ "properties": {
388
+ "input": {
389
+ "type": "string",
390
+ "minLength": 1,
391
+ "description": "The path of a file to use for the application's generated HTML index."
392
+ },
393
+ "output": {
394
+ "type": "string",
395
+ "minLength": 1,
396
+ "default": "index.html",
397
+ "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."
398
+ }
399
+ },
400
+ "required": ["input"]
401
+ },
402
+ {
403
+ "const": false,
404
+ "description": "Does not generate an `index.html` file."
405
+ }
406
+ ]
407
+ },
408
+ "statsJson": {
409
+ "type": "boolean",
410
+ "description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'.",
411
+ "default": false
412
+ },
413
+ "budgets": {
414
+ "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
415
+ "type": "array",
416
+ "items": {
417
+ "$ref": "#/definitions/budget"
418
+ },
419
+ "default": []
420
+ },
421
+ "webWorkerTsConfig": {
422
+ "type": "string",
423
+ "description": "TypeScript configuration for Web Worker modules."
424
+ },
425
+ "crossOrigin": {
426
+ "type": "string",
427
+ "description": "Define the crossorigin attribute setting of elements that provide CORS support.",
428
+ "default": "none",
429
+ "enum": ["none", "anonymous", "use-credentials"]
430
+ },
431
+ "allowedCommonJsDependencies": {
432
+ "description": "A list of CommonJS packages that are allowed to be used without a build time warning.",
433
+ "type": "array",
434
+ "items": {
435
+ "type": "string"
436
+ },
437
+ "default": []
438
+ },
439
+ "buildLibsFromSource": {
440
+ "type": "boolean",
441
+ "description": "Read buildable libraries from source instead of building them separately.",
442
+ "default": true
443
+ }
444
+ },
445
+ "additionalProperties": false,
446
+ "required": ["outputPath", "index", "main", "tsConfig"],
447
+ "definitions": {
448
+ "assetPattern": {
449
+ "oneOf": [
450
+ {
451
+ "type": "object",
452
+ "properties": {
453
+ "followSymlinks": {
454
+ "type": "boolean",
455
+ "default": false,
456
+ "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
457
+ },
458
+ "glob": {
459
+ "type": "string",
460
+ "description": "The pattern to match."
461
+ },
462
+ "input": {
463
+ "type": "string",
464
+ "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
465
+ },
466
+ "ignore": {
467
+ "description": "An array of globs to ignore.",
468
+ "type": "array",
469
+ "items": {
470
+ "type": "string"
471
+ }
472
+ },
473
+ "output": {
474
+ "type": "string",
475
+ "description": "Absolute path within the output."
476
+ }
477
+ },
478
+ "additionalProperties": false,
479
+ "required": ["glob", "input", "output"]
480
+ },
481
+ {
482
+ "type": "string"
483
+ }
484
+ ]
485
+ },
486
+ "fileReplacement": {
487
+ "type": "object",
488
+ "properties": {
489
+ "replace": {
490
+ "type": "string",
491
+ "pattern": "\\.(([cm]?j|t)sx?|json)$"
492
+ },
493
+ "with": {
494
+ "type": "string",
495
+ "pattern": "\\.(([cm]?j|t)sx?|json)$"
496
+ }
497
+ },
498
+ "additionalProperties": false,
499
+ "required": ["replace", "with"]
500
+ },
501
+ "budget": {
502
+ "type": "object",
503
+ "properties": {
504
+ "type": {
505
+ "type": "string",
506
+ "description": "The type of budget.",
507
+ "enum": [
508
+ "all",
509
+ "allScript",
510
+ "any",
511
+ "anyScript",
512
+ "anyComponentStyle",
513
+ "bundle",
514
+ "initial"
515
+ ]
516
+ },
517
+ "name": {
518
+ "type": "string",
519
+ "description": "The name of the bundle."
520
+ },
521
+ "baseline": {
522
+ "type": "string",
523
+ "description": "The baseline size for comparison."
524
+ },
525
+ "maximumWarning": {
526
+ "type": "string",
527
+ "description": "The maximum threshold for warning relative to the baseline."
528
+ },
529
+ "maximumError": {
530
+ "type": "string",
531
+ "description": "The maximum threshold for error relative to the baseline."
532
+ },
533
+ "minimumWarning": {
534
+ "type": "string",
535
+ "description": "The minimum threshold for warning relative to the baseline."
536
+ },
537
+ "minimumError": {
538
+ "type": "string",
539
+ "description": "The minimum threshold for error relative to the baseline."
540
+ },
541
+ "warning": {
542
+ "type": "string",
543
+ "description": "The threshold for warning relative to the baseline (min & max)."
544
+ },
545
+ "error": {
546
+ "type": "string",
547
+ "description": "The threshold for error relative to the baseline (min & max)."
548
+ }
549
+ },
550
+ "additionalProperties": false,
551
+ "required": ["type"]
552
+ }
553
+ }
554
+ }