@angular-devkit/build-angular 12.2.1 → 12.2.5

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/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "12.2.1",
3
+ "version": "12.2.5",
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": "1.0.1",
10
- "@angular-devkit/architect": "0.1202.1",
11
- "@angular-devkit/build-optimizer": "0.1202.1",
12
- "@angular-devkit/build-webpack": "0.1202.1",
13
- "@angular-devkit/core": "12.2.1",
10
+ "@angular-devkit/architect": "0.1202.5",
11
+ "@angular-devkit/build-optimizer": "0.1202.5",
12
+ "@angular-devkit/build-webpack": "0.1202.5",
13
+ "@angular-devkit/core": "12.2.5",
14
14
  "@babel/core": "7.14.8",
15
15
  "@babel/generator": "7.14.8",
16
16
  "@babel/helper-annotate-as-pure": "7.14.5",
@@ -22,7 +22,7 @@
22
22
  "@babel/template": "7.14.5",
23
23
  "@discoveryjs/json-ext": "0.5.3",
24
24
  "@jsdevtools/coverage-istanbul-loader": "3.0.5",
25
- "@ngtools/webpack": "12.2.1",
25
+ "@ngtools/webpack": "12.2.5",
26
26
  "ansi-colors": "4.1.1",
27
27
  "babel-loader": "8.2.2",
28
28
  "browserslist": "^4.9.1",
@@ -34,7 +34,7 @@
34
34
  "critters": "0.0.10",
35
35
  "css-loader": "6.2.0",
36
36
  "css-minimizer-webpack-plugin": "3.0.2",
37
- "esbuild": "0.12.17",
37
+ "esbuild": "0.12.24",
38
38
  "find-cache-dir": "3.3.1",
39
39
  "glob": "7.1.7",
40
40
  "https-proxy-agent": "5.0.0",
@@ -44,7 +44,7 @@
44
44
  "less-loader": "10.0.1",
45
45
  "license-webpack-plugin": "2.3.20",
46
46
  "loader-utils": "2.0.0",
47
- "mini-css-extract-plugin": "2.1.0",
47
+ "mini-css-extract-plugin": "2.2.1",
48
48
  "minimatch": "3.0.4",
49
49
  "open": "8.2.1",
50
50
  "ora": "5.4.1",
@@ -77,11 +77,11 @@
77
77
  "webpack-subresource-integrity": "1.5.2"
78
78
  },
79
79
  "peerDependencies": {
80
- "@angular/compiler-cli": "^12.0.0 || ^12.2.0-next",
81
- "@angular/localize": "^12.0.0 || ^12.2.0-next",
82
- "@angular/service-worker": "^12.0.0 || ^12.2.0-next",
80
+ "@angular/compiler-cli": "^12.0.0",
81
+ "@angular/localize": "^12.0.0",
82
+ "@angular/service-worker": "^12.0.0",
83
83
  "karma": "^6.3.0",
84
- "ng-packagr": "^12.0.0 || ^12.1.0-next",
84
+ "ng-packagr": "^12.0.0",
85
85
  "protractor": "^7.0.0",
86
86
  "tailwindcss": "^2.0.0",
87
87
  "tslint": "^6.1.0",
@@ -98,7 +98,7 @@ function getDevServerConfig(wco) {
98
98
  },
99
99
  sockPath: path_1.posix.join(servePath, 'sockjs-node'),
100
100
  stats: false,
101
- compress: stylesOptimization.minify || scriptsOptimization,
101
+ compress: false,
102
102
  watchOptions: helpers_1.getWatchOptions(poll),
103
103
  https: getSslConfig(root, wco.buildOptions),
104
104
  overlay: {
@@ -261,6 +261,7 @@ function getStylesConfig(wco) {
261
261
  ],
262
262
  };
263
263
  const globalBundlesRegExp = new RegExp(`^(${Object.keys(entryPoints).join('|')})(\.[0-9a-f]{20})?.css$`);
264
+ const target = transformSupportedBrowsersToTargets(supportedBrowsers);
264
265
  extraMinimizers.push(
265
266
  // Component styles use esbuild which is faster and generates smaller files on average.
266
267
  // esbuild does not yet support style sourcemaps but component style sourcemaps are not
@@ -276,6 +277,7 @@ function getStylesConfig(wco) {
276
277
  loader: 'css',
277
278
  minify: true,
278
279
  sourcefile,
280
+ target,
279
281
  });
280
282
  return {
281
283
  code,
@@ -432,3 +434,30 @@ function getStylesConfig(wco) {
432
434
  };
433
435
  }
434
436
  exports.getStylesConfig = getStylesConfig;
437
+ function transformSupportedBrowsersToTargets(supportedBrowsers) {
438
+ const transformed = [];
439
+ // https://esbuild.github.io/api/#target
440
+ const esBuildSupportedBrowsers = new Set(['safari', 'firefox', 'edge', 'chrome', 'ios']);
441
+ for (const browser of supportedBrowsers) {
442
+ let [browserName, version] = browser.split(' ');
443
+ // browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
444
+ if (browserName === 'ios_saf') {
445
+ browserName = 'ios';
446
+ // browserslist also uses ranges for iOS Safari versions but only the lowest is required
447
+ // to perform minimum supported feature checks. esbuild also expects a single version.
448
+ [version] = version.split('-');
449
+ }
450
+ if (browserName === 'ie') {
451
+ transformed.push('edge12');
452
+ }
453
+ else if (esBuildSupportedBrowsers.has(browserName)) {
454
+ if (browserName === 'safari' && version === 'TP') {
455
+ // esbuild only supports numeric versions so `TP` is converted to a high number (999) since
456
+ // a Technology Preview (TP) of Safari is assumed to support all currently known features.
457
+ version = '999';
458
+ }
459
+ transformed.push(browserName + version);
460
+ }
461
+ }
462
+ return transformed.length ? transformed : undefined;
463
+ }
@@ -21,7 +21,7 @@ function markAsyncChunksNonInitial(webpackStats, extraEntryPoints) {
21
21
  // depended upon in Webpack, thus any extra entry point with `inject: false`,
22
22
  // **cannot** be loaded in main bundle.
23
23
  const asyncChunkIds = extraEntryPoints
24
- .filter((entryPoint) => !entryPoint.inject)
24
+ .filter((entryPoint) => !entryPoint.inject && entryPoints[entryPoint.bundleName])
25
25
  .flatMap((entryPoint) => { var _a; return (_a = entryPoints[entryPoint.bundleName].chunks) === null || _a === void 0 ? void 0 : _a.filter((n) => n !== 'runtime'); });
26
26
  // Find chunks for each ID.
27
27
  const asyncChunks = asyncChunkIds.map((chunkId) => {