From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/clean-css/lib/clean.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'node_modules/clean-css/lib/clean.js') diff --git a/node_modules/clean-css/lib/clean.js b/node_modules/clean-css/lib/clean.js index 62308efec..8cdb4b793 100644 --- a/node_modules/clean-css/lib/clean.js +++ b/node_modules/clean-css/lib/clean.js @@ -46,6 +46,22 @@ var CleanCSS = module.exports = function CleanCSS(options) { }; }; + +// for compatibility with optimize-css-assets-webpack-plugin +CleanCSS.process = function (input, opts) { + var cleanCss; + var optsTo = opts.to; + + delete opts.to; + cleanCss = new CleanCSS(Object.assign({ returnPromise: true, rebaseTo: optsTo }, opts)); + + return cleanCss.minify(input) + .then(function(output) { + return { css: output.styles }; + }); +}; + + CleanCSS.prototype.minify = function (input, maybeSourceMap, maybeCallback) { var options = this.options; -- cgit v1.2.3