babel-plugin-transform-class-display-name

    0.0.3 • Public • Published

    babel-plugin-transform-class-display-name

    Add a displayName static class property to all ES6 classes. This is useful if you use ES6 React components and want their name on runtime, but also want to use a minifier that renames functions (such as constructors).

    Will only work if you also use babel-plugin-syntax-class-properties and babel-plugin-transform-class-properties.

    Installation

    $ npm install --save-dev babel-plugin-transform-class-display-name

    Usage

    Via .babelrc

    .babelrc

    {
      "plugins": ["transform-class-display-name"]
    }

    Make sure your plugin is early in the list.

    Keywords

    Install

    npm i babel-plugin-transform-class-display-name

    DownloadsWeekly Downloads

    87

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • eteeselink