Skip to content

🔌 Babel plugin for running PostCSS on CSJS at build time

License

Notifications You must be signed in to change notification settings

rtsao/babel-plugin-csjs-postcss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🔌 Babel plugin for running PostCSS on CSJS at build time

Resources

License

Stars

Watchers

Forks

Packages

No packages published