add more plugins, rename some

This commit is contained in:
Sebastian McKenzie
2015-09-15 06:12:46 +01:00
parent 3e8cbc60eb
commit 9969224a93
328 changed files with 2013 additions and 1543 deletions

View File

@@ -0,0 +1,22 @@
export default function ({ types: t }) {
return {
visitor: require("babel-plugin-builder-react-jsx")({
pre(state) {
state.callee = state.tagExpr;
},
post(state) {
if (t.react.isCompatTag(state.tagName)) {
state.call = t.callExpression(
t.memberExpression(
t.memberExpression(t.identifier("React"), t.identifier("DOM")),
state.tagExpr,
t.isLiteral(state.tagExpr)
),
state.args
);
}
}
})
};
}