/babel-plugin-csjs-postcss

:electric_plug: Babel plugin for running PostCSS on CSJS at build time

Primary LanguageJavaScriptMIT LicenseMIT

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