Skip to content

Commit 53e4246

Browse files
author
Angular Builds
committed
5967d79c7 build: update angular
1 parent ddb0dbf commit 53e4246

File tree

6 files changed

+20
-18
lines changed

6 files changed

+20
-18
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "1.0.2",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#c9cb330a0",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#c9cb330a0",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#c9cb330a0",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#5967d79c7",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#5967d79c7",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#5967d79c7",
1313
"@babel/core": "7.16.7",
1414
"@babel/generator": "7.16.8",
1515
"@babel/helper-annotate-as-pure": "7.16.7",
@@ -20,7 +20,7 @@
2020
"@babel/runtime": "7.16.7",
2121
"@babel/template": "7.16.7",
2222
"@discoveryjs/json-ext": "0.5.6",
23-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#c9cb330a0",
23+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#5967d79c7",
2424
"ansi-colors": "4.1.1",
2525
"babel-loader": "8.2.3",
2626
"babel-plugin-istanbul": "6.1.1",

src/webpack/configs/common.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,14 @@ async function getCommonConfig(wco) {
272272
module: {
273273
// Show an error for missing exports instead of a warning.
274274
strictExportPresence: true,
275-
parser: webWorkerTsConfig === undefined
276-
? {
277-
javascript: {
278-
worker: false,
279-
url: false,
280-
},
281-
}
282-
: undefined,
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+
},
283283
rules: [
284284
{
285285
test: /\.?(svg|html)$/,

src/webpack/plugins/javascript-optimizer-plugin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ class JavaScriptOptimizerPlugin {
9191
if (this.options.target <= typescript_1.ScriptTarget.ES5) {
9292
target = 5;
9393
}
94-
else if (this.options.target < typescript_1.ScriptTarget.ESNext) {
95-
target = Number(typescript_1.ScriptTarget[this.options.target].slice(2));
94+
else if (this.options.target === typescript_1.ScriptTarget.ESNext) {
95+
target = 'next';
9696
}
9797
else {
98-
target = 2020;
98+
target = Number(typescript_1.ScriptTarget[this.options.target].slice(2));
9999
}
100100
}
101101
// Setup the options used by all worker tasks

src/webpack/plugins/javascript-optimizer-worker.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface OptimizeRequestOptions {
4141
/**
4242
* Specifies the target ECMAScript version for the output code.
4343
*/
44-
target: 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020;
44+
target: 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 'next';
4545
/**
4646
* Controls whether esbuild should only use the WASM-variant instead of trying to
4747
* use the native variant. Some platforms may not support the native-variant and

src/webpack/plugins/javascript-optimizer-worker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ async function default_1({ asset, options }) {
2626
// esbuild is used as a first pass
2727
const esbuildResult = await optimizeWithEsbuild(asset.code, asset.name, options);
2828
// terser is used as a second pass
29-
const terserResult = await optimizeWithTerser(asset.name, esbuildResult.code, options.sourcemap, options.target, options.advanced);
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);
3032
// Merge intermediate sourcemaps with input sourcemap if enabled
3133
let fullSourcemap;
3234
if (options.sourcemap) {

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu Jan 13 2022 00:53:09 GMT+0000 (Coordinated Universal Time)
1+
Sun Jan 16 2022 20:10:09 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)