// 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