Skip to content

Commit ae07d36

Browse files
committed
build: update terser-webpack-plugin to version 5
1 parent 79c5284 commit ae07d36

File tree

4 files changed

+8
-27
lines changed

4 files changed

+8
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"tar": "^6.0.0",
220220
"temp": "^0.9.0",
221221
"terser": "5.7.0",
222-
"terser-webpack-plugin": "4.2.3",
222+
"terser-webpack-plugin": "5.1.2",
223223
"text-table": "0.2.0",
224224
"through2": "^4.0.0",
225225
"tree-kill": "1.2.2",

packages/angular_devkit/build_angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"stylus": "0.54.8",
6666
"stylus-loader": "6.0.0",
6767
"terser": "5.7.0",
68-
"terser-webpack-plugin": "4.2.3",
68+
"terser-webpack-plugin": "5.1.2",
6969
"text-table": "0.2.0",
7070
"tree-kill": "1.2.2",
7171
"webpack": "5.37.0",

packages/angular_devkit/build_angular/src/webpack/configs/common.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
6161

6262
// determine hashing format
6363
const hashFormat = getOutputHashFormat(buildOptions.outputHashing || 'none');
64+
const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot);
6465

6566
const targetInFileName = getEsVersionForFileName(
6667
tsConfig.options.target,
@@ -75,8 +76,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
7576
const differentialLoadingMode = buildOptions.differentialLoadingNeeded && !buildOptions.watch;
7677
if (platform !== 'server') {
7778
if (differentialLoadingMode || tsConfig.options.target === ScriptTarget.ES5) {
78-
const buildBrowserFeatures = new BuildBrowserFeatures(projectRoot);
79-
8079
if (buildBrowserFeatures.isEs5SupportNeeded()) {
8180
const polyfillsChunkName = 'polyfills-es5';
8281
entryPoints[polyfillsChunkName] = [path.join(__dirname, '..', 'es5-polyfills.js')];
@@ -391,21 +390,18 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
391390
};
392391

393392
const globalScriptsNames = globalScriptsByBundleName.map((s) => s.bundleName);
393+
394394
extraMinimizers.push(
395395
new TerserPlugin({
396-
sourceMap: scriptsSourceMap,
397396
parallel: maxWorkers,
398-
cache: !cachingDisabled && findCachePath('terser-webpack'),
399397
extractComments: false,
400398
exclude: globalScriptsNames,
401399
terserOptions,
402400
}),
403401
// Script bundles are fully optimized here in one step since they are never downleveled.
404402
// They are shared between ES2015 & ES5 outputs so must support ES5.
405403
new TerserPlugin({
406-
sourceMap: scriptsSourceMap,
407404
parallel: maxWorkers,
408-
cache: !cachingDisabled && findCachePath('terser-webpack'),
409405
extractComments: false,
410406
include: globalScriptsNames,
411407
terserOptions: {

yarn.lock

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6622,7 +6622,7 @@ jasminewd2@^2.1.0:
66226622
resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e"
66236623
integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=
66246624

6625-
jest-worker@26.6.2, jest-worker@^26.3.0, jest-worker@^26.5.0, jest-worker@^26.6.2:
6625+
jest-worker@26.6.2, jest-worker@^26.3.0, jest-worker@^26.6.2:
66266626
version "26.6.2"
66276627
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
66286628
integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
@@ -11144,22 +11144,7 @@ temp@^0.9.0:
1114411144
mkdirp "^0.5.1"
1114511145
rimraf "~2.6.2"
1114611146

11147-
terser-webpack-plugin@4.2.3:
11148-
version "4.2.3"
11149-
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz#28daef4a83bd17c1db0297070adc07fc8cfc6a9a"
11150-
integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ==
11151-
dependencies:
11152-
cacache "^15.0.5"
11153-
find-cache-dir "^3.3.1"
11154-
jest-worker "^26.5.0"
11155-
p-limit "^3.0.2"
11156-
schema-utils "^3.0.0"
11157-
serialize-javascript "^5.0.1"
11158-
source-map "^0.6.1"
11159-
terser "^5.3.4"
11160-
webpack-sources "^1.4.3"
11161-
11162-
terser-webpack-plugin@^5.1.1:
11147+
terser-webpack-plugin@5.1.2, terser-webpack-plugin@^5.1.1:
1116311148
version "5.1.2"
1116411149
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.2.tgz#51d295eb7cc56785a67a372575fdc46e42d5c20c"
1116511150
integrity sha512-6QhDaAiVHIQr5Ab3XUWZyDmrIPCHMiqJVljMF91YKyqwKkL5QHnYMkrMBy96v9Z7ev1hGhSEw1HQZc2p/s5Z8Q==
@@ -11171,7 +11156,7 @@ terser-webpack-plugin@^5.1.1:
1117111156
source-map "^0.6.1"
1117211157
terser "^5.7.0"
1117311158

11174-
terser@5.7.0, terser@^5.3.4, terser@^5.7.0:
11159+
terser@5.7.0, terser@^5.7.0:
1117511160
version "5.7.0"
1117611161
resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693"
1117711162
integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g==
@@ -12029,7 +12014,7 @@ webpack-merge@5.7.3:
1202912014
clone-deep "^4.0.1"
1203012015
wildcard "^2.0.0"
1203112016

12032-
webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.3:
12017+
webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0:
1203312018
version "1.4.3"
1203412019
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
1203512020
integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==

0 commit comments

Comments
 (0)