newrelic-experimental / newrelic-nextjs-integration

NewRelic Browser and APM agent NextJs integration (front and back-end respectively)
Apache License 2.0
27 stars 22 forks source link

(fix) Change New Relic 'require' with 'import' #13

Closed christianvuerings closed 1 year ago

christianvuerings commented 1 year ago

Changes

Replaces the New Relic require with import

Why

We use import everywhere else in the file

christianvuerings commented 1 year ago

@matewilk would you be able to take a look?

matewilk commented 1 year ago

Thanks @christianvuerings

josephmarkus commented 1 year ago

@christianvuerings FYI same here and here

matewilk commented 1 year ago

Here you go @josephmarkus https://github.com/newrelic-experimental/newrelic-nextjs-integration/pull/15

The PR requires a bit more testing so it might take a few days before it's merged, but you can copy->paste bits and pieces if you need to to your repo. (might not work depending on your setup, the dynamic import in _error.tsx file causes some issues)

josephmarkus commented 1 year ago

@matewilk thanks! I did notice that await import in _error.tsx explodes on yarn build complaining about a bunch of missing modules etc.