Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

babel-plugin-csjs-postcss

rtsao4MIT0.3.0

Babel plugin for running postcss on csjs

csjs, babel-plugin

readme

babel-plugin-csjs-postcss

build status dependencies status

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"]
  }]]
}

Advanced Configuration

.babelrc

{
  "plugins": [["csjs-postcss", {
    "plugins": [["autoprefixer", {"browsers": ["last 2 versions"]}]]
  }]]
}