babel-plugin-transform-class-prototype-name
v1.0.1
Published
Manaully sets a classes prototype.name after each definition
Downloads
10
Readme
babel-plugin-class-display-name 
After the creation of each class, the plugin manually sets the prototype.name to the class name. This means that after minification class errors still report correctly if you dont have source maps enabled.
Installation
$ npm install babel-plugin-class-prototype-nameUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["class-prototype-name"]
}Via CLI
$ babel --plugins class-prototype-name script.jsVia Node API
require("babel-core").transform("code", {
plugins: ["class-prototype-name"]
});Compilation
In
class CustomError extends Error {}Out
class CustomError extends Error {}
CustomError.prototype.name = "CustomError";After minification
class a extends Error {}
a.prototype.name = "CustomError";