Merge branch 'master' into 7.0
This commit is contained in:
@@ -95,6 +95,16 @@ require("babel-core").transform("code", {
|
||||
|
||||
## Options
|
||||
|
||||
* `pragma` - Replace the function used when compiling JSX expressions (Defaults to `React.createElement`).
|
||||
- Note that the `@jsx React.DOM` pragma has been deprecated as of React v0.12
|
||||
* `useBuiltIns` - When spreading props, use Object.assign instead of Babel's extend helper (Disabled by default).
|
||||
### `pragma`
|
||||
|
||||
`string`, defaults to `React.createElement`.
|
||||
|
||||
Replace the function used when compiling JSX expressions.
|
||||
|
||||
Note that the `@jsx React.DOM` pragma has been deprecated as of React v0.12
|
||||
|
||||
### `useBuiltIns`
|
||||
|
||||
`boolean`, defaults to `false`.
|
||||
|
||||
When spreading props, use `Object.assign` directly instead of Babel's extend helper.
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint max-len: 0 */
|
||||
|
||||
import jsx from "babel-plugin-syntax-jsx";
|
||||
import helper from "babel-helper-builder-react-jsx";
|
||||
|
||||
@@ -31,7 +29,8 @@ export default function ({ types: t }) {
|
||||
if (matches) {
|
||||
id = matches[1];
|
||||
if (id === "React.DOM") {
|
||||
throw file.buildCodeFrameError(comment, "The @jsx React.DOM pragma has been deprecated as of React 0.12");
|
||||
throw file.buildCodeFrameError(comment,
|
||||
"The @jsx React.DOM pragma has been deprecated as of React 0.12");
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user