trycatch-loader

0.2.0 • Public • Published

try-catch wrapper loader for webpack

support both es6 and jsx

install

bash npm install --save trycatch-loader

usage

module: {
        preLoaders: [{
            test: /\.(js|jsx)$/,
            exclude: /(node_modules|bower_components|vender)/,
            loader: 'trycatch'
        }],
        

catchHandler

pass function string to trycatchHandler porperty

module.exports = {
    entry: {
        app: path.join(__dirname, '/app/app.jsx'),
        react: ['react']
    },
    trycatchHandler: 'console.error(e);windowsendError(e)',
        

Readme

Keywords

none

Package Sidebar

Install

npm i trycatch-loader

Weekly Downloads

0

Version

0.2.0

License

ISC

Last publish

Collaborators

  • june.chiu