Package Exports
- babel-plugin-react-autoprefix
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (babel-plugin-react-autoprefix) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
babel-plugin-react-autoprefix
Adds vendor prefixes to inline styles in React elements through autoprefix.
Installation
$ npm install babel-plugin-react-autoprefixUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["react-autoprefix"]
}Via CLI
$ babel --plugins react-autoprefix script.jsVia 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.*$/ }]
}