Skip to content

Commit 966a378

Browse files
committed
build: update terser-webpack-plugin to version 5
(cherry picked from commit ae07d36)
1 parent a125e67 commit 966a378

File tree

4 files changed

+12
-31
lines changed

4 files changed

+12
-31
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"tar": "^6.0.0",
219219
"temp": "^0.9.0",
220220
"terser": "5.7.0",
221-
"terser-webpack-plugin": "4.2.3",
221+
"terser-webpack-plugin": "5.1.2",
222222
"text-table": "0.2.0",
223223
"through2": "^4.0.0",
224224
"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": "5.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.36.2",

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: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6757,7 +6757,7 @@ jasminewd2@^2.1.0:
67576757
resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-2.2.0.tgz#e37cf0b17f199cce23bea71b2039395246b4ec4e"
67586758
integrity sha1-43zwsX8ZnM4jvqcbIDk5Uka07E4=
67596759

6760-
[email protected], jest-worker@^26.3.0, jest-worker@^26.5.0, jest-worker@^26.6.2:
6760+
[email protected], jest-worker@^26.3.0, jest-worker@^26.6.2:
67616761
version "26.6.2"
67626762
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
67636763
integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
@@ -11315,34 +11315,19 @@ temp@^0.9.0:
1131511315
mkdirp "^0.5.1"
1131611316
rimraf "~2.6.2"
1131711317

11318-
11319-
version "4.2.3"
11320-
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-4.2.3.tgz#28daef4a83bd17c1db0297070adc07fc8cfc6a9a"
11321-
integrity sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ==
11322-
dependencies:
11323-
cacache "^15.0.5"
11324-
find-cache-dir "^3.3.1"
11325-
jest-worker "^26.5.0"
11326-
p-limit "^3.0.2"
11327-
schema-utils "^3.0.0"
11328-
serialize-javascript "^5.0.1"
11329-
source-map "^0.6.1"
11330-
terser "^5.3.4"
11331-
webpack-sources "^1.4.3"
11332-
11333-
terser-webpack-plugin@^5.1.1:
11334-
version "5.1.1"
11335-
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.1.tgz#7effadee06f7ecfa093dbbd3e9ab23f5f3ed8673"
11336-
integrity sha512-5XNNXZiR8YO6X6KhSGXfY0QrGrCRlSwAEjIIrlRQR4W8nP69TaJUlh3bkuac6zzgspiGPfKEHcY295MMVExl5Q==
11318+
[email protected], terser-webpack-plugin@^5.1.1:
11319+
version "5.1.2"
11320+
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.2.tgz#51d295eb7cc56785a67a372575fdc46e42d5c20c"
11321+
integrity sha512-6QhDaAiVHIQr5Ab3XUWZyDmrIPCHMiqJVljMF91YKyqwKkL5QHnYMkrMBy96v9Z7ev1hGhSEw1HQZc2p/s5Z8Q==
1133711322
dependencies:
1133811323
jest-worker "^26.6.2"
1133911324
p-limit "^3.1.0"
1134011325
schema-utils "^3.0.0"
1134111326
serialize-javascript "^5.0.1"
1134211327
source-map "^0.6.1"
11343-
terser "^5.5.1"
11328+
terser "^5.7.0"
1134411329

11345-
[email protected], terser@^5.3.4, terser@^5.5.1:
11330+
[email protected], terser@^5.5.1:
1134611331
version "5.7.0"
1134711332
resolved "https://registry.yarnpkg.com/terser/-/terser-5.7.0.tgz#a761eeec206bc87b605ab13029876ead938ae693"
1134811333
integrity sha512-HP5/9hp2UaZt5fYkuhNBR8YyRcT8juw8+uFbAme53iN9hblvKnLUTKkmwJG6ocWpIKf8UK4DoeWG4ty0J6S6/g==
@@ -12200,7 +12185,7 @@ [email protected]:
1220012185
clone-deep "^4.0.1"
1220112186
wildcard "^2.0.0"
1220212187

12203-
webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0, webpack-sources@^1.4.3:
12188+
webpack-sources@^1.1.0, webpack-sources@^1.2.0, webpack-sources@^1.3.0:
1220412189
version "1.4.3"
1220512190
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
1220612191
integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==

0 commit comments

Comments
 (0)