@babel/plugin-transform-react-display-name var foo = React.createClass({ displayName: "foo",}); // React <= 15 displayName: "bar",{}require("@babel/core").transformSync("code", { plugins: ["@babel/plugin-transform-react-display-name"],