@@ -285,14 +285,14 @@ export function constructWebpackConfigFunction(
285
285
// front-end-only problem, and because `sentry-cli` handles sourcemaps more reliably with the comment than
286
286
// without, the option to use `hidden-source-map` only applies to the client-side build.
287
287
newConfig . devtool = userSentryOptions . hideSourceMaps && ! isServer ? 'hidden-source-map' : 'source-map' ;
288
- }
289
288
290
- newConfig . plugins = newConfig . plugins || [ ] ;
291
- newConfig . plugins . push (
292
- new SentryWebpackPlugin (
293
- getWebpackPluginOptions ( buildContext , userSentryWebpackPluginOptions , userSentryOptions ) ,
294
- ) ,
295
- ) ;
289
+ newConfig . plugins = newConfig . plugins || [ ] ;
290
+ newConfig . plugins . push (
291
+ new SentryWebpackPlugin (
292
+ getWebpackPluginOptions ( buildContext , userSentryWebpackPluginOptions , userSentryOptions ) ,
293
+ ) ,
294
+ ) ;
295
+ }
296
296
}
297
297
298
298
return newConfig ;
@@ -584,7 +584,7 @@ export function getWebpackPluginOptions(
584
584
userPluginOptions : Partial < SentryWebpackPluginOptions > ,
585
585
userSentryOptions : UserSentryOptions ,
586
586
) : SentryWebpackPluginOptions {
587
- const { buildId, isServer, webpack, config, dev : isDev , dir : projectDir } = buildContext ;
587
+ const { buildId, isServer, webpack, config, dir : projectDir } = buildContext ;
588
588
const userNextConfig = config as NextConfigObject ;
589
589
590
590
const distDirAbsPath = path . resolve ( projectDir , userNextConfig . distDir || '.next' ) ; // `.next` is the default directory
@@ -628,7 +628,6 @@ export function getWebpackPluginOptions(
628
628
urlPrefix,
629
629
entries : [ ] , // The webpack plugin's release injection breaks the `app` directory - we inject the release manually with the value injection loader instead.
630
630
release : getSentryRelease ( buildId ) ,
631
- dryRun : isDev ,
632
631
} ) ;
633
632
634
633
checkWebpackPluginOverrides ( defaultPluginOptions , userPluginOptions ) ;
@@ -733,7 +732,7 @@ export function getWebpackPluginOptions(
733
732
734
733
/** Check various conditions to decide if we should run the plugin */
735
734
function shouldEnableWebpackPlugin ( buildContext : BuildContext , userSentryOptions : UserSentryOptions ) : boolean {
736
- const { isServer, dev : isDev } = buildContext ;
735
+ const { isServer } = buildContext ;
737
736
const { disableServerWebpackPlugin, disableClientWebpackPlugin } = userSentryOptions ;
738
737
739
738
/** Non-negotiable */
@@ -758,18 +757,6 @@ function shouldEnableWebpackPlugin(buildContext: BuildContext, userSentryOptions
758
757
return ! disableClientWebpackPlugin ;
759
758
}
760
759
761
- /** Situations where the default is to disable the plugin */
762
-
763
- // TODO: Are there analogs to Vercel's preveiw and dev modes on other deployment platforms?
764
-
765
- if ( isDev || process . env . NODE_ENV === 'development' ) {
766
- // TODO (v8): Right now in dev we set the plugin to dryrun mode, and our boilerplate includes setting the plugin to
767
- // `silent`, so for the vast majority of users, it's as if the plugin doesn't run at all in dev. Making that
768
- // official is technically a breaking change, though, so we probably should wait until v8.
769
- // return false
770
- }
771
-
772
- // We've passed all of the tests!
773
760
return true ;
774
761
}
775
762
0 commit comments