@angular-devkit/build-angular 13.1.3 → 13.1.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/package.json +6 -6
- package/src/webpack/configs/common.js +8 -8
- package/src/webpack/plugins/any-component-style-budget-checker.js +4 -0
- package/src/webpack/plugins/javascript-optimizer-plugin.js +3 -3
- package/src/webpack/plugins/javascript-optimizer-worker.d.ts +1 -1
- package/src/webpack/plugins/javascript-optimizer-worker.js +3 -1
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.4",
|
|
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.2",
|
|
10
|
-
"@angular-devkit/architect": "0.1301.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1301.
|
|
12
|
-
"@angular-devkit/core": "13.1.
|
|
10
|
+
"@angular-devkit/architect": "0.1301.4",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1301.4",
|
|
12
|
+
"@angular-devkit/core": "13.1.4",
|
|
13
13
|
"@babel/core": "7.16.0",
|
|
14
14
|
"@babel/generator": "7.16.0",
|
|
15
15
|
"@babel/helper-annotate-as-pure": "7.16.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/runtime": "7.16.3",
|
|
21
21
|
"@babel/template": "7.16.0",
|
|
22
22
|
"@discoveryjs/json-ext": "0.5.6",
|
|
23
|
-
"@ngtools/webpack": "13.1.
|
|
23
|
+
"@ngtools/webpack": "13.1.4",
|
|
24
24
|
"ansi-colors": "4.1.1",
|
|
25
25
|
"babel-loader": "8.2.3",
|
|
26
26
|
"babel-plugin-istanbul": "6.1.1",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"postcss": "8.4.4",
|
|
51
51
|
"postcss-import": "14.0.2",
|
|
52
52
|
"postcss-loader": "6.2.1",
|
|
53
|
-
"postcss-preset-env": "
|
|
53
|
+
"postcss-preset-env": "7.2.3",
|
|
54
54
|
"regenerator-runtime": "0.13.9",
|
|
55
55
|
"resolve-url-loader": "4.0.0",
|
|
56
56
|
"rxjs": "6.6.7",
|
|
@@ -272,14 +272,14 @@ async function getCommonConfig(wco) {
|
|
|
272
272
|
module: {
|
|
273
273
|
// Show an error for missing exports instead of a warning.
|
|
274
274
|
strictExportPresence: true,
|
|
275
|
-
parser:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
275
|
+
parser: {
|
|
276
|
+
javascript: {
|
|
277
|
+
// Disable auto URL asset module creation. This doesn't effect `new Worker(new URL(...))`
|
|
278
|
+
// https://webpack.js.org/guides/asset-modules/#url-assets
|
|
279
|
+
url: false,
|
|
280
|
+
worker: !!webWorkerTsConfig,
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
283
|
rules: [
|
|
284
284
|
{
|
|
285
285
|
test: /\.?(svg|html)$/,
|
|
@@ -47,6 +47,10 @@ class AnyComponentStyleBudgetChecker {
|
|
|
47
47
|
name: PLUGIN_NAME,
|
|
48
48
|
stage: webpack_1.Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
|
|
49
49
|
}, () => {
|
|
50
|
+
// No budgets.
|
|
51
|
+
if (this.budgets.length === 0) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
50
54
|
// In AOT compilations component styles get processed in child compilations.
|
|
51
55
|
if (!compilation.compiler.parentCompilation) {
|
|
52
56
|
return;
|
|
@@ -91,11 +91,11 @@ class JavaScriptOptimizerPlugin {
|
|
|
91
91
|
if (this.options.target <= typescript_1.ScriptTarget.ES5) {
|
|
92
92
|
target = 5;
|
|
93
93
|
}
|
|
94
|
-
else if (this.options.target
|
|
95
|
-
target =
|
|
94
|
+
else if (this.options.target === typescript_1.ScriptTarget.ESNext) {
|
|
95
|
+
target = 'next';
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
|
-
target =
|
|
98
|
+
target = Number(typescript_1.ScriptTarget[this.options.target].slice(2));
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
// Setup the options used by all worker tasks
|
|
@@ -41,7 +41,7 @@ export interface OptimizeRequestOptions {
|
|
|
41
41
|
/**
|
|
42
42
|
* Specifies the target ECMAScript version for the output code.
|
|
43
43
|
*/
|
|
44
|
-
target: 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020;
|
|
44
|
+
target: 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 'next';
|
|
45
45
|
/**
|
|
46
46
|
* Controls whether esbuild should only use the WASM-variant instead of trying to
|
|
47
47
|
* use the native variant. Some platforms may not support the native-variant and
|
|
@@ -26,7 +26,9 @@ async function default_1({ asset, options }) {
|
|
|
26
26
|
// esbuild is used as a first pass
|
|
27
27
|
const esbuildResult = await optimizeWithEsbuild(asset.code, asset.name, options);
|
|
28
28
|
// terser is used as a second pass
|
|
29
|
-
const terserResult = await optimizeWithTerser(asset.name, esbuildResult.code, options.sourcemap,
|
|
29
|
+
const terserResult = await optimizeWithTerser(asset.name, esbuildResult.code, options.sourcemap,
|
|
30
|
+
// Terser only supports up to ES2020.
|
|
31
|
+
options.target === 'next' ? 2020 : options.target, options.advanced);
|
|
30
32
|
// Merge intermediate sourcemaps with input sourcemap if enabled
|
|
31
33
|
let fullSourcemap;
|
|
32
34
|
if (options.sourcemap) {
|