@babel/plugin-transform-react-display-name

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