This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
//index.js file
|
||||
import { form } from "./export";
|
||||
|
||||
function ParentComponent() {
|
||||
return <form.TestComponent />;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var _export = require("./export");
|
||||
|
||||
function ParentComponent() {
|
||||
return babelHelpers.jsx(_export.form.TestComponent, {});
|
||||
} //index.js file
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"plugins": [
|
||||
"external-helpers",
|
||||
"syntax-jsx",
|
||||
"transform-react-inline-elements",
|
||||
"transform-react-jsx",
|
||||
"transform-es2015-modules-commonjs"
|
||||
]
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import * as t from "babel-types";
|
||||
export let ReferencedIdentifier = {
|
||||
types: ["Identifier", "JSXIdentifier"],
|
||||
checkPath({ node, parent }: NodePath, opts?: Object): boolean {
|
||||
if (!t.isIdentifier(node, opts)) {
|
||||
if (!t.isIdentifier(node, opts) && !t.isJSXMemberExpression(parent, opts)) {
|
||||
if (t.isJSXIdentifier(node, opts)) {
|
||||
if (react.isCompatTag(node.name)) return false;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user