1
1
/* eslint-disable @typescript-eslint/no-var-requires */
2
2
const { PHASE_DEVELOPMENT_SERVER } = require ( "next/constants" )
3
- const { withSentryConfig } = require ( "@sentry/nextjs" )
4
3
5
4
const withBundleAnalyzer = require ( "@next/bundle-analyzer" ) ( {
6
5
enabled : process . env . ANALYZE === "true" ,
@@ -27,7 +26,7 @@ module.exports = (phase, { defaultConfig }) => {
27
26
let nextConfig = {
28
27
...defaultConfig ,
29
28
reactStrictMode : true ,
30
- webpack : ( config , { webpack } ) => {
29
+ webpack : ( config ) => {
31
30
config . module . rules . push ( {
32
31
test : / \. y a ? m l $ / ,
33
32
use : "yaml-loader" ,
@@ -58,30 +57,13 @@ module.exports = (phase, { defaultConfig }) => {
58
57
// Modify the file loader rule to ignore *.svg, since we have it handled now.
59
58
fileLoaderRule . exclude = / \. s v g $ / i
60
59
61
- // Tree shake Sentry debug code
62
- // ref. https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/tree-shaking/#tree-shaking-with-nextjs
63
- config . plugins . push (
64
- new webpack . DefinePlugin ( {
65
- __SENTRY_DEBUG__ : false ,
66
- __RRWEB_EXCLUDE_IFRAME__ : true ,
67
- __RRWEB_EXCLUDE_SHADOW_DOM__ : true ,
68
- __SENTRY_EXCLUDE_REPLAY_WORKER__ : true ,
69
- } )
70
- )
71
-
72
60
return config
73
61
} ,
74
62
i18n,
75
63
trailingSlash : true ,
76
64
images : {
77
65
deviceSizes : [ 640 , 750 , 828 , 1080 , 1200 , 1504 , 1920 ] ,
78
66
} ,
79
- env : {
80
- NEXT_PUBLIC_CONTEXT : process . env . CONTEXT ,
81
- } ,
82
- experimental : {
83
- instrumentationHook : true ,
84
- } ,
85
67
}
86
68
87
69
if ( phase !== PHASE_DEVELOPMENT_SERVER ) {
@@ -110,15 +92,5 @@ module.exports = (phase, { defaultConfig }) => {
110
92
}
111
93
}
112
94
113
- return withBundleAnalyzer (
114
- withSentryConfig ( nextConfig , {
115
- // TODO: temp config, update this to the correct org & project
116
- org : "ethereumorg-ow" ,
117
- project : "javascript-nextjs" ,
118
- authToken : process . env . SENTRY_AUTH_TOKEN ,
119
- release : `${ process . env . BUILD_ID } _${ process . env . REVIEW_ID } ` ,
120
- disableLogger : true ,
121
- silent : true ,
122
- } )
123
- )
95
+ return withBundleAnalyzer ( nextConfig )
124
96
}
0 commit comments