WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/terser-webpack-plugin/dist/utils.js
@@ -14,7 +14,7 @@
 */
/**
 * @typedef {Array<string>} ExtractedComments
 * @typedef {string[]} ExtractedComments
 */
const notSettled = Symbol("not-settled");
@@ -641,6 +641,26 @@
 */
esbuildMinify.supportsWorkerThreads = () => false;
/* istanbul ignore next */
/**
 * @param {Input} input input
 * @param {RawSourceMap=} sourceMap source map
 * @param {CustomOptions=} minimizerOptions options
 * @returns {Promise<MinimizedResult>} minimized result
 */
async function jsonMinify(input, sourceMap, minimizerOptions) {
  const options = /** @type {{ replacer?: Parameters<typeof JSON.stringify>[1], space?: Parameters<typeof JSON.stringify>[2] }} */
  minimizerOptions;
  const [[, code]] = Object.entries(input);
  const result = JSON.stringify(JSON.parse(code), options.replacer, options.space);
  return {
    code: result
  };
}
jsonMinify.getMinimizerVersion = () => "1.0.0";
jsonMinify.supportsWorker = () => false;
jsonMinify.supportsWorkerThreads = () => false;
/**
 * @template T
 * @typedef {() => T} FunctionReturning
@@ -670,6 +690,7 @@
}
module.exports = {
  esbuildMinify,
  jsonMinify,
  memoize,
  swcMinify,
  terserMinify,