Skip to content

UXtemple/babel-plugin-react-autoprefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-react-autoprefix

Adds vendor prefixes to inline styles in React elements through autoprefix.

Build Status

Installation

$ npm install babel-plugin-react-autoprefix

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["react-autoprefix"]
}

Via CLI

$ babel --plugins react-autoprefix script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["react-autoprefix"]
});

Changing the matching pattern

The plugin will match style props by default. If you want to match other props, like styleSomething, you can use the plugin's matcher option, e.g. in .babelrc:

{
  "plugins": ["react-autoprefix", { matcher: /^style.*$/ }]
}

About

Adds vendor prefixes to styles in React elements

Resources

Stars

Watchers

Forks

Packages

No packages published