@@ -546,10 +546,43 @@ The following previously deprecated API has been removed from the `@sentry/nextj
546
546
- ` IS_BUILD `
547
547
- ` isBuild `
548
548
549
+ #### Merging of the Sentry Webpack Plugin options and SDK Build options
550
+
551
+ With version 8 of the Sentry Next.js SDK, ` withSentryConfig ` will no longer accept 3 arguments. The second argument
552
+ (holding options for the Sentry Webpack plugin) and the third argument (holding options for SDK build-time
553
+ configuration) should now be passed as one:
554
+
555
+ ``` ts
556
+ // OLD
557
+ const nextConfig = {
558
+ // Your Next.js options...
559
+ };
560
+
561
+ module .exports = withSentryConfig (
562
+ nextConfig ,
563
+ {
564
+ // Your Sentry Webpack Plugin Options...
565
+ },
566
+ {
567
+ // Your Sentry SDK options...
568
+ },
569
+ );
570
+
571
+ // NEW
572
+ const nextConfig = {
573
+ // Your Next.js options...
574
+ };
575
+
576
+ module .exports = withSentryConfig (nextConfig , {
577
+ // Your Sentry Webpack Plugin Options...
578
+ // AND your Sentry SDK options...
579
+ });
580
+ ```
581
+
549
582
#### Removal of the ` sentry ` property in your Next.js options (next.config.js)
550
583
551
584
With version 8 of the Sentry Next.js SDK, the SDK will no longer support passing Next.js options with a ` sentry `
552
- property to ` withSentryConfig ` . Please use the third argument of ` withSentryConfig ` to configure the SDK instead:
585
+ property to ` withSentryConfig ` . Please use the second argument of ` withSentryConfig ` to configure the SDK instead:
553
586
554
587
``` ts
555
588
// v7
@@ -572,21 +605,25 @@ const nextConfig = {
572
605
// Your Next.js options...
573
606
};
574
607
575
- module .exports = withSentryConfig (
576
- nextConfig ,
577
- {
578
- // Your Sentry Webpack Plugin Options...
579
- },
580
- {
581
- // Your Sentry SDK options...
582
- },
583
- );
608
+ module .exports = withSentryConfig (nextConfig , {
609
+ // Your Sentry Webpack Plugin Options...
610
+ // AND your Sentry SDK options...
611
+ });
584
612
```
585
613
586
614
The reason for this change is to have one consistent way of defining the SDK options. We hope that this change will
587
615
reduce confusion when setting up the SDK, with the upside that the explicit option is properly typed and will therefore
588
616
have code completion.
589
617
618
+ #### Updated the ` @sentry/webpack-plugin ` dependency to version 2
619
+
620
+ We bumped the internal usage of ` @sentry/webpack-plugin ` to a new major version. This comes with multiple upsides like a
621
+ simpler configuration interface and the use of new state of the art Debug ID technology. Debug IDs will simplify the
622
+ setup for source maps in Sentry and will not require you to match stack frame paths to uploaded artifacts anymore.
623
+
624
+ To see the new options, check out the docs at https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/ ,
625
+ or look at the TypeScript type definitions of ` withSentryConfig ` .
626
+
590
627
### Astro SDK
591
628
592
629
#### Removal of ` trackHeaders ` option for Astro middleware
0 commit comments