bugsnag-js icon indicating copy to clipboard operation
bugsnag-js copied to clipboard

Update Next.js example to v13

Open rafaelalmeidatk opened this issue 2 years ago • 1 comments

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.js file
  • Changed hardcoded internal strings with exported variables from next/constants
  • Removed unnecessary NEXT_IS_SERVER env variable
  • Removed usage of IgnorePlugin from 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

rafaelalmeidatk avatar May 07 '23 14:05 rafaelalmeidatk

Hey @rafaelalmeidatk, thanks for this PR, we will review as soon as priorities allow.

johnkiely1 avatar May 09 '23 08:05 johnkiely1