From efbc2ffe6a1ee5ec38a4396305561d6515d0943e Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 30 Aug 2024 17:21:18 +0800 Subject: node fixes, updates --- .../webpack/lib/WebpackOptionsDefaulter.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 node_modules/webpack/lib/WebpackOptionsDefaulter.js (limited to 'node_modules/webpack/lib/WebpackOptionsDefaulter.js') diff --git a/node_modules/webpack/lib/WebpackOptionsDefaulter.js b/node_modules/webpack/lib/WebpackOptionsDefaulter.js new file mode 100644 index 00000000..12fbe698 --- /dev/null +++ b/node_modules/webpack/lib/WebpackOptionsDefaulter.js @@ -0,0 +1,26 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +"use strict"; + +const { applyWebpackOptionsDefaults } = require("./config/defaults"); +const { getNormalizedWebpackOptions } = require("./config/normalization"); + +/** @typedef {import("./config/normalization").WebpackOptions} WebpackOptions */ +/** @typedef {import("./config/normalization").WebpackOptionsNormalized} WebpackOptionsNormalized */ + +class WebpackOptionsDefaulter { + /** + * @param {WebpackOptions} options webpack options + * @returns {WebpackOptionsNormalized} normalized webpack options + */ + process(options) { + const normalizedOptions = getNormalizedWebpackOptions(options); + applyWebpackOptionsDefaults(normalizedOptions); + return normalizedOptions; + } +} + +module.exports = WebpackOptionsDefaulter; -- cgit v1.2.3