gregberge / error-overlay-webpack-plugin

Catch errors with style 💥✨
MIT License
873 stars 45 forks source link
create-react-app error error-handling error-overlay webpack webpack-plugin

Error Overlay Webpack Plugin

Node.js CI

Catch errors with style 💥✨

This plugin will display an error overlay in your application. It is the same error overlay used in create-react-app.

Error Overlay Webpack Plugin Example
npm install error-overlay-webpack-plugin --save-dev

Usage

// webpack.config.js
const ErrorOverlayPlugin = require('error-overlay-webpack-plugin')

module.exports = {
  entry: 'main.js',
  output: {
    path: __dirname + '/dist',
    filename: 'bundle.js',
  },
  plugins: [new ErrorOverlayPlugin()],
  devtool: 'cheap-module-source-map', // 'eval' is not supported by error-overlay-webpack-plugin
}

License

MIT