Unverified Commit 75ca8c0e authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

update webpack to 5.43.0 (#26979)

parent 697756f8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"dependencies": { "dependencies": {
"schema-utils3": "npm:schema-utils@3.0.0", "schema-utils3": "npm:schema-utils@3.0.0",
"webpack-sources2": "npm:webpack-sources@2.3.0", "webpack-sources2": "npm:webpack-sources@2.3.0",
"webpack5": "npm:webpack@5.39.0" "webpack5": "npm:webpack@5.43.0"
}, },
"resolutions": { "resolutions": {
"browserslist": "4.16.6", "browserslist": "4.16.6",
......
This diff is collapsed.
This diff is collapsed.
...@@ -18,8 +18,6 @@ const { ...@@ -18,8 +18,6 @@ const {
/** @typedef {import("./index.js").CustomMinifyFunction} CustomMinifyFunction */ /** @typedef {import("./index.js").CustomMinifyFunction} CustomMinifyFunction */
/** @typedef {import("./index.js").MinifyOptions} MinifyOptions */
/** @typedef {import("terser").MinifyOptions} TerserMinifyOptions */ /** @typedef {import("terser").MinifyOptions} TerserMinifyOptions */
/** @typedef {import("terser").MinifyOutput} MinifyOutput */ /** @typedef {import("terser").MinifyOutput} MinifyOutput */
...@@ -32,14 +30,18 @@ const { ...@@ -32,14 +30,18 @@ const {
/** @typedef {import("./index.js").ExtractCommentsCondition} ExtractCommentsCondition */ /** @typedef {import("./index.js").ExtractCommentsCondition} ExtractCommentsCondition */
/**
* @typedef {Object.<any, any>} CustomMinifyOptions
*/
/** /**
* @typedef {Object} InternalMinifyOptions * @typedef {Object} InternalMinifyOptions
* @property {string} name * @property {string} name
* @property {string} input * @property {string} input
* @property {RawSourceMap | undefined} inputSourceMap * @property {RawSourceMap} [inputSourceMap]
* @property {ExtractCommentsOptions} extractComments * @property {ExtractCommentsOptions} extractComments
* @property {CustomMinifyFunction | undefined} minify * @property {CustomMinifyFunction} [minify]
* @property {MinifyOptions} minifyOptions * @property {TerserMinifyOptions | CustomMinifyOptions} minifyOptions
*/ */
/** /**
...@@ -61,12 +63,18 @@ const { ...@@ -61,12 +63,18 @@ const {
function buildTerserOptions(terserOptions = {}) { function buildTerserOptions(terserOptions = {}) {
// Need deep copy objects to avoid https://github.com/terser/terser/issues/366
return { ...terserOptions, return { ...terserOptions,
compress: typeof terserOptions.compress === "boolean" ? terserOptions.compress : { ...terserOptions.compress
},
// ecma: terserOptions.ecma,
// ie8: terserOptions.ie8,
// keep_classnames: terserOptions.keep_classnames,
// keep_fnames: terserOptions.keep_fnames,
mangle: terserOptions.mangle == null ? true : typeof terserOptions.mangle === "boolean" ? terserOptions.mangle : { ...terserOptions.mangle mangle: terserOptions.mangle == null ? true : typeof terserOptions.mangle === "boolean" ? terserOptions.mangle : { ...terserOptions.mangle
}, },
// Ignoring sourceMap from options // module: terserOptions.module,
// eslint-disable-next-line no-undefined // nameCache: { ...terserOptions.toplevel },
sourceMap: undefined,
// the `output` option is deprecated // the `output` option is deprecated
...(terserOptions.format ? { ...(terserOptions.format ? {
format: { format: {
...@@ -78,7 +86,14 @@ function buildTerserOptions(terserOptions = {}) { ...@@ -78,7 +86,14 @@ function buildTerserOptions(terserOptions = {}) {
beautify: false, beautify: false,
...terserOptions.output ...terserOptions.output
} }
}) }),
parse: { ...terserOptions.parse
},
// safari10: terserOptions.safari10,
// Ignoring sourceMap from options
// eslint-disable-next-line no-undefined
sourceMap: undefined // toplevel: terserOptions.toplevel
}; };
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment