@angular-devkit/build-angular 15.0.0-next.4 → 15.0.0-next.6

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.
Files changed (36) hide show
  1. package/package.json +20 -17
  2. package/src/builders/app-shell/index.js +39 -40
  3. package/src/builders/app-shell/render-worker.d.ts +36 -0
  4. package/src/builders/app-shell/render-worker.js +82 -0
  5. package/src/builders/browser/index.d.ts +2 -0
  6. package/src/builders/browser/index.js +38 -19
  7. package/src/builders/browser/schema.json +2 -2
  8. package/src/builders/browser-esbuild/compiler-plugin.d.ts +1 -0
  9. package/src/builders/browser-esbuild/compiler-plugin.js +127 -53
  10. package/src/builders/browser-esbuild/index.js +3 -2
  11. package/src/builders/browser-esbuild/profiling.d.ts +11 -0
  12. package/src/builders/browser-esbuild/profiling.js +64 -0
  13. package/src/builders/browser-esbuild/sass-plugin.js +11 -5
  14. package/src/builders/browser-esbuild/schema.json +2 -2
  15. package/src/builders/dev-server/index.d.ts +2 -0
  16. package/src/builders/dev-server/index.js +10 -7
  17. package/src/builders/karma/find-tests-plugin.js +1 -0
  18. package/src/builders/karma/index.d.ts +1 -1
  19. package/src/builders/karma/index.js +4 -5
  20. package/src/builders/server/schema.json +1 -1
  21. package/src/sass/sass-service.d.ts +12 -1
  22. package/src/sass/sass-service.js +19 -11
  23. package/src/utils/environment-options.d.ts +1 -0
  24. package/src/utils/environment-options.js +3 -1
  25. package/src/webpack/configs/common.js +29 -5
  26. package/src/webpack/configs/index.d.ts +0 -1
  27. package/src/webpack/configs/index.js +0 -1
  28. package/src/webpack/configs/styles.js +49 -25
  29. package/src/webpack/plugins/occurrences-plugin.d.ts +18 -0
  30. package/src/webpack/plugins/occurrences-plugin.js +79 -0
  31. package/src/webpack/utils/stats.d.ts +13 -8
  32. package/src/webpack/utils/stats.js +57 -6
  33. package/src/webpack/configs/analytics.d.ts +0 -11
  34. package/src/webpack/configs/analytics.js +0 -27
  35. package/src/webpack/plugins/analytics.d.ts +0 -66
  36. package/src/webpack/plugins/analytics.js +0 -236
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "15.0.0-next.4",
3
+ "version": "15.0.0-next.6",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "builders": "builders.json",
8
8
  "dependencies": {
9
9
  "@ampproject/remapping": "2.2.0",
10
- "@angular-devkit/architect": "0.1500.0-next.4",
11
- "@angular-devkit/build-webpack": "0.1500.0-next.4",
12
- "@angular-devkit/core": "15.0.0-next.4",
10
+ "@angular-devkit/architect": "0.1500.0-next.6",
11
+ "@angular-devkit/build-webpack": "0.1500.0-next.6",
12
+ "@angular-devkit/core": "15.0.0-next.6",
13
13
  "@babel/core": "7.19.3",
14
- "@babel/generator": "7.19.3",
14
+ "@babel/generator": "7.19.5",
15
15
  "@babel/helper-annotate-as-pure": "7.18.6",
16
16
  "@babel/plugin-proposal-async-generator-functions": "7.19.1",
17
17
  "@babel/plugin-transform-async-to-generator": "7.18.6",
18
18
  "@babel/plugin-transform-runtime": "7.19.1",
19
- "@babel/preset-env": "7.19.3",
20
- "@babel/runtime": "7.19.0",
19
+ "@babel/preset-env": "7.19.4",
20
+ "@babel/runtime": "7.19.4",
21
21
  "@babel/template": "7.18.10",
22
22
  "@discoveryjs/json-ext": "0.5.7",
23
- "@ngtools/webpack": "15.0.0-next.4",
23
+ "@ngtools/webpack": "15.0.0-next.6",
24
24
  "ansi-colors": "4.1.3",
25
25
  "autoprefixer": "10.4.12",
26
26
  "babel-loader": "8.2.5",
27
27
  "babel-plugin-istanbul": "6.1.1",
28
28
  "browserslist": "^4.9.1",
29
- "cacache": "16.1.3",
29
+ "cacache": "17.0.0",
30
30
  "chokidar": "3.5.3",
31
31
  "copy-webpack-plugin": "11.0.0",
32
32
  "critters": "0.0.16",
@@ -38,7 +38,7 @@
38
38
  "jsonc-parser": "3.2.0",
39
39
  "karma-source-map-support": "1.4.0",
40
40
  "less": "4.1.3",
41
- "less-loader": "11.0.0",
41
+ "less-loader": "11.1.0",
42
42
  "license-webpack-plugin": "4.0.2",
43
43
  "loader-utils": "3.2.0",
44
44
  "mini-css-extract-plugin": "2.6.1",
@@ -47,16 +47,15 @@
47
47
  "ora": "5.4.1",
48
48
  "parse5-html-rewriting-stream": "6.0.1",
49
49
  "piscina": "3.2.0",
50
- "postcss": "8.4.17",
51
- "postcss-import": "15.0.0",
50
+ "postcss": "8.4.18",
52
51
  "postcss-loader": "7.0.1",
53
- "regenerator-runtime": "0.13.9",
52
+ "regenerator-runtime": "0.13.10",
54
53
  "resolve-url-loader": "5.0.0",
55
54
  "rxjs": "6.6.7",
56
55
  "sass": "1.55.0",
57
- "sass-loader": "13.0.2",
56
+ "sass-loader": "13.1.0",
58
57
  "semver": "7.3.8",
59
- "source-map-loader": "4.0.0",
58
+ "source-map-loader": "4.0.1",
60
59
  "source-map-support": "0.5.21",
61
60
  "terser": "5.15.1",
62
61
  "text-table": "0.2.0",
@@ -74,17 +73,21 @@
74
73
  "peerDependencies": {
75
74
  "@angular/compiler-cli": "^15.0.0-next",
76
75
  "@angular/localize": "^15.0.0-next",
76
+ "@angular/platform-server": "^15.0.0-next",
77
77
  "@angular/service-worker": "^15.0.0-next",
78
78
  "karma": "^6.3.0",
79
79
  "ng-packagr": "^15.0.0-next",
80
80
  "protractor": "^7.0.0",
81
81
  "tailwindcss": "^2.0.0 || ^3.0.0",
82
- "typescript": ">=4.6.2 <4.9"
82
+ "typescript": "~4.8.2"
83
83
  },
84
84
  "peerDependenciesMeta": {
85
85
  "@angular/localize": {
86
86
  "optional": true
87
87
  },
88
+ "@angular/platform-server": {
89
+ "optional": true
90
+ },
88
91
  "@angular/service-worker": {
89
92
  "optional": true
90
93
  },
@@ -113,7 +116,7 @@
113
116
  "url": "https://github.com/angular/angular-cli.git"
114
117
  },
115
118
  "engines": {
116
- "node": "^14.20.0 || >=16.10.0",
119
+ "node": "^14.20.0 || ^16.13.0 || >=18.10.0",
117
120
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
118
121
  "yarn": ">= 1.13.0"
119
122
  },
@@ -34,9 +34,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
34
34
  };
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  const architect_1 = require("@angular-devkit/architect");
37
- const assert_1 = __importDefault(require("assert"));
38
37
  const fs = __importStar(require("fs"));
39
38
  const path = __importStar(require("path"));
39
+ const piscina_1 = __importDefault(require("piscina"));
40
40
  const utils_1 = require("../../utils");
41
41
  const error_1 = require("../../utils/error");
42
42
  const inline_critical_css_1 = require("../../utils/index-file/inline-critical-css");
@@ -49,10 +49,9 @@ async function _renderUniversal(options, context, browserResult, serverResult, s
49
49
  const rawBrowserOptions = (await context.getTargetOptions(browserTarget));
50
50
  const browserBuilderName = await context.getBuilderNameForTarget(browserTarget);
51
51
  const browserOptions = await context.validateOptions(rawBrowserOptions, browserBuilderName);
52
- // Initialize zone.js
52
+ // Locate zone.js to load in the render worker
53
53
  const root = context.workspaceRoot;
54
54
  const zonePackage = require.resolve('zone.js', { paths: [root] });
55
- await Promise.resolve().then(() => __importStar(require(zonePackage)));
56
55
  const projectName = context.target && context.target.project;
57
56
  if (!projectName) {
58
57
  throw new Error('The builder requires a target.');
@@ -66,46 +65,46 @@ async function _renderUniversal(options, context, browserResult, serverResult, s
66
65
  deployUrl: browserOptions.deployUrl,
67
66
  })
68
67
  : undefined;
69
- for (const { path: outputPath, baseHref } of browserResult.outputs) {
70
- const localeDirectory = path.relative(browserResult.baseOutputPath, outputPath);
71
- const browserIndexOutputPath = path.join(outputPath, 'index.html');
72
- const indexHtml = await fs.promises.readFile(browserIndexOutputPath, 'utf8');
73
- const serverBundlePath = await _getServerModuleBundlePath(options, context, serverResult, localeDirectory);
74
- const { AppServerModule, renderModule, ɵSERVER_CONTEXT } = (await Promise.resolve().then(() => __importStar(require(serverBundlePath))));
75
- (0, assert_1.default)(renderModule, `renderModule was not exported from: ${serverBundlePath}.`);
76
- (0, assert_1.default)(AppServerModule, `AppServerModule was not exported from: ${serverBundlePath}.`);
77
- (0, assert_1.default)(ɵSERVER_CONTEXT, `ɵSERVER_CONTEXT was not exported from: ${serverBundlePath}.`);
78
- // Load platform server module renderer
79
- let html = await renderModule(AppServerModule, {
80
- document: indexHtml,
81
- url: options.route,
82
- extraProviders: [
83
- {
84
- provide: ɵSERVER_CONTEXT,
85
- useValue: 'app-shell',
86
- },
87
- ],
88
- });
89
- // Overwrite the client index file.
90
- const outputIndexPath = options.outputIndexPath
91
- ? path.join(root, options.outputIndexPath)
92
- : browserIndexOutputPath;
93
- if (inlineCriticalCssProcessor) {
94
- const { content, warnings, errors } = await inlineCriticalCssProcessor.process(html, {
95
- outputPath,
68
+ const renderWorker = new piscina_1.default({
69
+ filename: require.resolve('./render-worker'),
70
+ maxThreads: 1,
71
+ workerData: { zonePackage },
72
+ });
73
+ try {
74
+ for (const { path: outputPath, baseHref } of browserResult.outputs) {
75
+ const localeDirectory = path.relative(browserResult.baseOutputPath, outputPath);
76
+ const browserIndexOutputPath = path.join(outputPath, 'index.html');
77
+ const indexHtml = await fs.promises.readFile(browserIndexOutputPath, 'utf8');
78
+ const serverBundlePath = await _getServerModuleBundlePath(options, context, serverResult, localeDirectory);
79
+ let html = await renderWorker.run({
80
+ serverBundlePath,
81
+ document: indexHtml,
82
+ url: options.route,
96
83
  });
97
- html = content;
98
- if (warnings.length || errors.length) {
99
- spinner.stop();
100
- warnings.forEach((m) => context.logger.warn(m));
101
- errors.forEach((m) => context.logger.error(m));
102
- spinner.start();
84
+ // Overwrite the client index file.
85
+ const outputIndexPath = options.outputIndexPath
86
+ ? path.join(root, options.outputIndexPath)
87
+ : browserIndexOutputPath;
88
+ if (inlineCriticalCssProcessor) {
89
+ const { content, warnings, errors } = await inlineCriticalCssProcessor.process(html, {
90
+ outputPath,
91
+ });
92
+ html = content;
93
+ if (warnings.length || errors.length) {
94
+ spinner.stop();
95
+ warnings.forEach((m) => context.logger.warn(m));
96
+ errors.forEach((m) => context.logger.error(m));
97
+ spinner.start();
98
+ }
99
+ }
100
+ await fs.promises.writeFile(outputIndexPath, html);
101
+ if (browserOptions.serviceWorker) {
102
+ await (0, service_worker_1.augmentAppWithServiceWorker)(projectRoot, root, outputPath, baseHref !== null && baseHref !== void 0 ? baseHref : '/', browserOptions.ngswConfigPath);
103
103
  }
104
104
  }
105
- await fs.promises.writeFile(outputIndexPath, html);
106
- if (browserOptions.serviceWorker) {
107
- await (0, service_worker_1.augmentAppWithServiceWorker)(projectRoot, root, outputPath, baseHref !== null && baseHref !== void 0 ? baseHref : '/', browserOptions.ngswConfigPath);
108
- }
105
+ }
106
+ finally {
107
+ await renderWorker.destroy();
109
108
  }
110
109
  return browserResult;
111
110
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ /**
9
+ * A request to render a Server bundle generate by the universal server builder.
10
+ */
11
+ interface RenderRequest {
12
+ /**
13
+ * The path to the server bundle that should be loaded and rendered.
14
+ */
15
+ serverBundlePath: string;
16
+ /**
17
+ * The existing HTML document as a string that will be augmented with the rendered application.
18
+ */
19
+ document: string;
20
+ /**
21
+ * An optional URL path that represents the Angular route that should be rendered.
22
+ */
23
+ url: string | undefined;
24
+ }
25
+ /**
26
+ * Renders an application based on a provided server bundle path, initial document, and optional URL route.
27
+ * @param param0 A request to render a server bundle.
28
+ * @returns A promise that resolves to the render HTML document for the application.
29
+ */
30
+ declare function render({ serverBundlePath, document, url }: RenderRequest): Promise<string>;
31
+ /**
32
+ * The default export will be the promise returned by the initialize function.
33
+ * This is awaited by piscina prior to using the Worker.
34
+ */
35
+ declare const _default: Promise<typeof render>;
36
+ export default _default;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
32
+ var __importDefault = (this && this.__importDefault) || function (mod) {
33
+ return (mod && mod.__esModule) ? mod : { "default": mod };
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const node_assert_1 = __importDefault(require("node:assert"));
37
+ const node_worker_threads_1 = require("node:worker_threads");
38
+ /**
39
+ * The fully resolved path to the zone.js package that will be loaded during worker initialization.
40
+ * This is passed as workerData when setting up the worker via the `piscina` package.
41
+ */
42
+ const { zonePackage } = node_worker_threads_1.workerData;
43
+ /**
44
+ * Renders an application based on a provided server bundle path, initial document, and optional URL route.
45
+ * @param param0 A request to render a server bundle.
46
+ * @returns A promise that resolves to the render HTML document for the application.
47
+ */
48
+ async function render({ serverBundlePath, document, url }) {
49
+ const { AppServerModule, renderModule, ɵSERVER_CONTEXT } = (await Promise.resolve().then(() => __importStar(require(serverBundlePath))));
50
+ (0, node_assert_1.default)(renderModule, `renderModule was not exported from: ${serverBundlePath}.`);
51
+ (0, node_assert_1.default)(AppServerModule, `AppServerModule was not exported from: ${serverBundlePath}.`);
52
+ (0, node_assert_1.default)(ɵSERVER_CONTEXT, `ɵSERVER_CONTEXT was not exported from: ${serverBundlePath}.`);
53
+ // Render platform server module
54
+ const html = await renderModule(AppServerModule, {
55
+ document,
56
+ url,
57
+ extraProviders: [
58
+ {
59
+ provide: ɵSERVER_CONTEXT,
60
+ useValue: 'app-shell',
61
+ },
62
+ ],
63
+ });
64
+ return html;
65
+ }
66
+ /**
67
+ * Initializes the worker when it is first created by loading the Zone.js package
68
+ * into the worker instance.
69
+ *
70
+ * @returns A promise resolving to the render function of the worker.
71
+ */
72
+ async function initialize() {
73
+ // Setup Zone.js
74
+ await Promise.resolve().then(() => __importStar(require(zonePackage)));
75
+ // Return the render function for use
76
+ return render;
77
+ }
78
+ /**
79
+ * The default export will be the promise returned by the initialize function.
80
+ * This is awaited by piscina prior to using the Worker.
81
+ */
82
+ exports.default = initialize();
@@ -11,11 +11,13 @@ import { Observable } from 'rxjs';
11
11
  import webpack from 'webpack';
12
12
  import { ExecutionTransformer } from '../../transforms';
13
13
  import { IndexHtmlTransform } from '../../utils/index-file/index-html-generator';
14
+ import { BuildEventStats } from '../../webpack/utils/stats';
14
15
  import { Schema as BrowserBuilderSchema } from './schema';
15
16
  /**
16
17
  * @experimental Direct usage of this type is considered experimental.
17
18
  */
18
19
  export declare type BrowserBuilderOutput = BuilderOutput & {
20
+ stats: BuildEventStats;
19
21
  baseOutputPath: string;
20
22
  /**
21
23
  * @deprecated in version 14. Use 'outputs' instead.
@@ -69,7 +69,6 @@ async function initialize(options, context, webpackConfigurationTransform) {
69
69
  const { config, projectRoot, projectSourceRoot, i18n } = await (0, webpack_browser_config_1.generateI18nBrowserWebpackConfigFromContext)(adjustedOptions, context, (wco) => [
70
70
  (0, configs_1.getCommonConfig)(wco),
71
71
  (0, configs_1.getStylesConfig)(wco),
72
- (0, configs_1.getAnalyticsConfig)(wco, context),
73
72
  ]);
74
73
  // Validate asset option values if processed directly
75
74
  if (((_a = options.assets) === null || _a === void 0 ? void 0 : _a.length) && !((_b = adjustedOptions.assets) === null || _b === void 0 ? void 0 : _b.length)) {
@@ -137,7 +136,9 @@ function buildWebpackBrowser(options, context, transforms = {}) {
137
136
  context.logger.info(stats.toString(config.stats));
138
137
  }
139
138
  }),
140
- }).pipe((0, operators_1.concatMap)(async (buildEvent) => {
139
+ }).pipe((0, operators_1.concatMap)(
140
+ // eslint-disable-next-line max-lines-per-function
141
+ async (buildEvent) => {
141
142
  var _a, _b, _c, _d, _e, _f, _g, _h;
142
143
  const spinner = new spinner_1.Spinner();
143
144
  spinner.enabled = options.progress !== false;
@@ -164,7 +165,10 @@ function buildWebpackBrowser(options, context, transforms = {}) {
164
165
  if ((0, stats_1.statsHasErrors)(webpackStats)) {
165
166
  context.logger.error((0, stats_1.statsErrorsToString)(webpackStats, { colors: true }));
166
167
  }
167
- return { success };
168
+ return {
169
+ webpackStats: webpackRawStats,
170
+ output: { success: false },
171
+ };
168
172
  }
169
173
  else {
170
174
  outputPaths = (0, output_paths_1.ensureOutputPaths)(baseOutputPath, i18n);
@@ -172,7 +176,10 @@ function buildWebpackBrowser(options, context, transforms = {}) {
172
176
  if (i18n.shouldInline) {
173
177
  const success = await (0, i18n_inlining_1.i18nInlineEmittedFiles)(context, emittedFiles, i18n, baseOutputPath, Array.from(outputPaths.values()), scriptsEntryPointName, webpackOutputPath, options.i18nMissingTranslation);
174
178
  if (!success) {
175
- return { success: false };
179
+ return {
180
+ webpackStats: webpackRawStats,
181
+ output: { success: false },
182
+ };
176
183
  }
177
184
  }
178
185
  // Check for budget errors and display them to the user.
@@ -205,7 +212,13 @@ function buildWebpackBrowser(options, context, transforms = {}) {
205
212
  catch (err) {
206
213
  spinner.fail(color_1.colors.redBright('Copying of assets failed.'));
207
214
  (0, error_1.assertIsError)(err);
208
- return { success: false, error: 'Unable to copy assets: ' + err.message };
215
+ return {
216
+ output: {
217
+ success: false,
218
+ error: 'Unable to copy assets: ' + err.message,
219
+ },
220
+ webpackStats: webpackRawStats,
221
+ };
209
222
  }
210
223
  }
211
224
  if (options.index) {
@@ -249,12 +262,19 @@ function buildWebpackBrowser(options, context, transforms = {}) {
249
262
  }
250
263
  catch (error) {
251
264
  spinner.fail('Index html generation failed.');
252
- return { success: false, error: mapErrorToMessage(error) };
265
+ (0, error_1.assertIsError)(error);
266
+ return {
267
+ webpackStats: webpackRawStats,
268
+ output: { success: false, error: error.message },
269
+ };
253
270
  }
254
271
  }
255
272
  if (hasErrors) {
256
273
  spinner.fail('Index html generation failed.');
257
- return { success: false };
274
+ return {
275
+ webpackStats: webpackRawStats,
276
+ output: { success: false },
277
+ };
258
278
  }
259
279
  else {
260
280
  spinner.succeed('Index html generation complete.');
@@ -268,17 +288,25 @@ function buildWebpackBrowser(options, context, transforms = {}) {
268
288
  }
269
289
  catch (error) {
270
290
  spinner.fail('Service worker generation failed.');
271
- return { success: false, error: mapErrorToMessage(error) };
291
+ (0, error_1.assertIsError)(error);
292
+ return {
293
+ webpackStats: webpackRawStats,
294
+ output: { success: false, error: error.message },
295
+ };
272
296
  }
273
297
  }
274
298
  spinner.succeed('Service worker generation complete.');
275
299
  }
276
300
  }
277
301
  (0, stats_1.webpackStatsLogger)(context.logger, webpackStats, config, budgetFailures);
278
- return { success: buildSuccess };
302
+ return {
303
+ webpackStats: webpackRawStats,
304
+ output: { success: buildSuccess },
305
+ };
279
306
  }
280
- }), (0, operators_1.map)((event) => ({
307
+ }), (0, operators_1.map)(({ output: event, webpackStats }) => ({
281
308
  ...event,
309
+ stats: (0, stats_1.generateBuildEventStats)(webpackStats, options),
282
310
  baseOutputPath,
283
311
  outputPath: baseOutputPath,
284
312
  outputPaths: (outputPaths && Array.from(outputPaths.values())) || [baseOutputPath],
@@ -305,15 +333,6 @@ function buildWebpackBrowser(options, context, transforms = {}) {
305
333
  }
306
334
  }
307
335
  exports.buildWebpackBrowser = buildWebpackBrowser;
308
- function mapErrorToMessage(error) {
309
- if (error instanceof Error) {
310
- return error.message;
311
- }
312
- if (typeof error === 'string') {
313
- return error;
314
- }
315
- return undefined;
316
- }
317
336
  function assertNever(input) {
318
337
  throw new Error(`Unexpected call to assertNever() with input: ${JSON.stringify(input, null /* replacer */, 4 /* tabSize */)}`);
319
338
  }
@@ -133,8 +133,8 @@
133
133
  },
134
134
  "optimization": {
135
135
  "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.",
136
- "x-user-analytics": 16,
137
136
  "default": true,
137
+ "x-user-analytics": "ep.ng_optimization",
138
138
  "oneOf": [
139
139
  {
140
140
  "type": "object",
@@ -216,7 +216,7 @@
216
216
  "aot": {
217
217
  "type": "boolean",
218
218
  "description": "Build using Ahead of Time compilation.",
219
- "x-user-analytics": 13,
219
+ "x-user-analytics": "ep.ng_aot",
220
220
  "default": true
221
221
  },
222
222
  "sourceMap": {
@@ -10,6 +10,7 @@ import ts from 'typescript';
10
10
  import { BundleStylesheetOptions } from './stylesheets';
11
11
  export declare class SourceFileCache extends Map<string, ts.SourceFile> {
12
12
  readonly modifiedFiles: Set<string>;
13
+ readonly babelFileCache: Map<string, Uint8Array>;
13
14
  invalidate(files: Iterable<string>): void;
14
15
  }
15
16
  export interface CompilerPluginOptions {