diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/terser-webpack-plugin/dist/minify.js | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/terser-webpack-plugin/dist/minify.js')
| -rw-r--r-- | node_modules/terser-webpack-plugin/dist/minify.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/node_modules/terser-webpack-plugin/dist/minify.js b/node_modules/terser-webpack-plugin/dist/minify.js deleted file mode 100644 index 69c56f46..00000000 --- a/node_modules/terser-webpack-plugin/dist/minify.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -/** @typedef {import("./index.js").MinimizedResult} MinimizedResult */ -/** @typedef {import("./index.js").CustomOptions} CustomOptions */ - -/** - * @template T - * @param {import("./index.js").InternalOptions<T>} options - * @returns {Promise<MinimizedResult>} - */ -async function minify(options) { - const { - name, - input, - inputSourceMap, - extractComments - } = options; - const { - implementation, - options: minimizerOptions - } = options.minimizer; - return implementation({ - [name]: input - }, inputSourceMap, minimizerOptions, extractComments); -} - -/** - * @param {string} options - * @returns {Promise<MinimizedResult>} - */ -async function transform(options) { - // 'use strict' => this === undefined (Clean Scope) - // Safer for possible security issues, albeit not critical at all here - // eslint-disable-next-line no-param-reassign - const evaluatedOptions = - /** - * @template T - * @type {import("./index.js").InternalOptions<T>} - * */ - - // eslint-disable-next-line no-new-func - new Function("exports", "require", "module", "__filename", "__dirname", `'use strict'\nreturn ${options}`)(exports, require, module, __filename, __dirname); - return minify(evaluatedOptions); -} -module.exports = { - minify, - transform -};
\ No newline at end of file |
