-
-
Save adi518/c6fc67e6d5b29c792da8ff50034df1e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/postcss/postcss-plugin-boilerplate/ | |
const CryptoJS = require('crypto-js'); | |
module.exports = (_opts = {}) => { | |
return { | |
postcssPlugin: 'content-hash', | |
Root(root, _postcss) { | |
const contentHash = CryptoJS.MD5(root.source.input.css); | |
root.prepend({ text: `content-hash:${contentHash}` }); | |
}, | |
}; | |
}; | |
module.exports.postcss = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment