andreyvital / babel-plugin-extends-error

A babel plugin that converts extends `Error` to `ExtendableError`

Home Page:https://www.npmjs.com/package/babel-plugin-extends-error

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

babel-plugin-extends-error npm version

The problem: extends Error. The stack trace isn't available when your code is transpiled with babel.

Installation

npm install babel-plugin-extends-error --save

It requires es6-error installed on your side. Just npm install es6-error --save and you're good to go. This plugin simply detects if you're extending from Error and converts it to ExtendableError.

About

A babel plugin that converts extends `Error` to `ExtendableError`

https://www.npmjs.com/package/babel-plugin-extends-error


Languages

Language:JavaScript 100.0%