https://github.com/ymichael/javascript-error-overlay
A generic overlay that displays JavaScript errors on the page - heavily adapted/forked from facebook/create-react-app's react-error-overlay.
https://github.com/ymichael/javascript-error-overlay
Last synced: 28 days ago
JSON representation
A generic overlay that displays JavaScript errors on the page - heavily adapted/forked from facebook/create-react-app's react-error-overlay.
- Host: GitHub
- URL: https://github.com/ymichael/javascript-error-overlay
- Owner: ymichael
- Created: 2018-05-04T04:45:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-22T05:43:37.000Z (about 8 years ago)
- Last Synced: 2025-02-28T15:37:11.698Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# javascript-error-overlay
A generic overlay that displays JavaScript errors on the page - heavily adapted/forked from [facebook/create-react-app](https://github.com/facebook/create-react-app)'s [react-error-overlay](https://github.com/facebook/create-react-app/tree/next/packages/react-error-overlay).
## Usage
1. Build the overlay: `npm run build`
2. Include the script (`lib/index.js`) in your app and start listening for errors!
```
var errorOverlay = require('javascript-error-overlay');
errorOverlay.startReportingRuntimeErrors();
```
### Configuration Options
```
errorOverlay.startReportingRuntimeErrors({
shouldIgnoreError: function(e) {
...
}
});
```
## Development
When developing within this package, make sure you run `npm start` (or `yarn start`) so that the files are compiled as you work.
This is ran in watch mode by default.
If you would like to build this for production, run `npm run build:prod` (or `yarn build:prod`).
If you would like to build this one-off for development, you can run `NODE_ENV=development npm run build` (or `NODE_ENV=development yarn build`).