Babel plugin for running PostCSS on CSJS at build time
Autoprefixer example
npm i babel-plugin-csjs-postcss autoprefixer --save-dev
Before:
csjs`
.foo {
transform: ${foo};
}
`;
After:
csjs`
.foo {
-webkit-transform: ${ foo };
transform: ${ foo };
}
`;
.babelrc
{
"plugins": [["csjs-postcss", {
"plugins": ["autoprefixer"]
}]]
}
.babelrc
{
"plugins": [["csjs-postcss", {
"plugins": [["autoprefixer", {"browsers": ["last 2 versions"]}]]
}]]
}