bugsnag-js
bugsnag-js copied to clipboard
Update Next.js example to v13
Goal
:wave: Hi there, I recently added Bugsnag to a project and noticed the example is using a very old version of Next.js (from 2021!) so I went ahead and updated some of the files. Since I kept the pages dir I didn't have to change too much stuff, most of the changes are to simplify the code
Changeset
- Updated all dependencies (I worked with a fresh lockfile so that's why the diff is large)
- Added type-checking to the
next.config.jsfile - Changed hardcoded internal strings with exported variables from
next/constants - Removed unnecessary
NEXT_IS_SERVERenv variable - Removed usage of
IgnorePluginfrom the custom webpack config. Next.js does server-side code elimination so this library isn't bundled to the client
Testing
I tested the updated version with a new project in the Bugsnag dashboard
Hey @rafaelalmeidatk, thanks for this PR, we will review as soon as priorities allow.