Displays JS errors in browsers. Shows sources. Opens locations in VS Code. Framework agnostic.
npm install panic-overlayA lightweight standalone plain JS alternative to react-error-overlay that is not tied to React / Webpack and works with any framework or even without one.
If you miss that thing from create-react-app but do not want to use that framework (e.g. you want to use Parcel as a lightweight zero-configuration alternative) — here you go!
- Displays runtime errors in browsers
- Minimalistic implementation (bare DOM API), easily hackable
- Full sourcemap support (shows original code, not transpiled)
- Clickable locations (opens in VS Code), see the notes here
- Uncluttered stacktraces (collapses third party library calls)

``bash`
npm install panic-overlay
`javascript`
import 'panic-overlay' // should be the very first import in your app!
All-in-one browser bundle (batteries included), served from a CDN of your choice. Creates a global panic object.
- jsDelivr: https://cdn.jsdelivr.net/npm/panic-overlay/build/panic-overlay.browser.js
- unpkg: https://unpkg.com/panic-overlay
`html`
Here's how you can find an example usage of panic-overlay with various bundlers:
`sh`
git clone https://github.com/xpl/panic-overlay.git
cd panic-overlay
npm install
| Environment | Run with | Source folder |
| ----------------------- | ----------------------------------- | --------------------------------------------------------- |
|