let CleanCSS = require('clean-css');
try {
let cleanCSS = new CleanCSS({
batch: true,
});
let outputs = cleanCSS.minify([
{'path/to/file/one': {styles: 'html { color: #000000; }'}},
{'path/to/file/two': {styles: 'body { background: #ffffff; }'}}
]);
console.log("OK", outputs);
} catch (e) {
console.log("error", e);
}