Skip to content

Commit

Permalink
Merge pull request #20 from onigoetz/origin/patch-1
Browse files Browse the repository at this point in the history
Replace `Once` with `OnceExit` to do the compression last (fixes #19)
  • Loading branch information
lahmatiy committed Apr 5, 2021
2 parents 7b267e0 + 08b75a2 commit e6d81c8
Show file tree
Hide file tree
Showing 4 changed files with 527 additions and 729 deletions.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -4,7 +4,7 @@ const cssoToPostcss = require('./lib/cssoToPostcss.js');

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

0 comments on commit e6d81c8

Please sign in to comment.