@putout/plugin-postcss
v2.0.0
Published
šPutout plugin helps with migration to latest PostCSS
Maintainers
Readme
@putout/plugin-postcss 
postcss plugin helps to migrate to latest postcss version according to migration guide.
Install
npm i @putout/plugin-postcss -DRules
{
"rules": {
"postcss/replace-loader-with-creator": "on"
}
}replace-loader-with-creator
ā Example of incorrect code
module.exports = postcss.plugin('postcss-dark-theme-class', (opts = {}) => {
checkOpts(opts);
return (root, result) => {
root.walkAtRules((atrule) => {});
};
});ā Example of correct code
module.exports = (opts = {}) => {
checkOpts(opts);
return {
postcssPlugin: 'postcss-dark-theme-class',
Once(root) {
root.walkAtRules((atrule) => {});
},
};
};
module.exports.postcss = true;License
MIT
