const { compress } = require('csso').syntax;
const postcssToCsso = require('./lib/postcssToCsso.js');
const cssoToPostcss = require('./lib/cssoToPostcss.js');

module.exports = (options = {}) => ({
    postcssPlugin: 'postcss-csso',
    OnceExit(root, { result, postcss }) {
        result.root = cssoToPostcss(compress(postcssToCsso(root), options).ast, postcss);
    }
});
module.exports.postcss = true;

const { compress } = require('csso').syntax;
const postcssToCsso = require('./lib/postcssToCsso.js');
const cssoToPostcss = require('./lib/cssoToPostcss.js');

module.exports = (options = {}) => ({
    postcssPlugin: 'postcss-csso',
    Once(root, { result, postcss }) {
        result.root = cssoToPostcss(compress(postcssToCsso(root), options).ast, postcss);
    }
});
module.exports.postcss = true;

--- 
+++ 
@@ -4,7 +4,7 @@
 
 module.exports = (options = {}) => ({
     postcssPlugin: 'postcss-csso',
-    OnceExit(root, { result, postcss }) {
+    Once(root, { result, postcss }) {
         result.root = cssoToPostcss(compress(postcssToCsso(root), options).ast, postcss);
     }
 });
Replace `Once` with `OnceExit` to do the compression last