support both es6 and jsx
bash npm install --save trycatch-loader
module: {
preLoaders: [{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components|vender)/,
loader: 'trycatch'
}],
pass function string to trycatchHandler porperty
module.exports = {
entry: {
app: path.join(__dirname, '/app/app.jsx'),
react: ['react']
},
trycatchHandler: 'console.error(e);windowsendError(e)',