@@ -10,17 +10,17 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
1010const offlineConfig = require ( './config/next_offline' )
1111
1212// Use the SentryWebpack plugin to upload the source maps during build step
13- const SentryWebpackPlugin = require ( '@sentry/webpack-plugin' )
13+ // const SentryWebpackPlugin = require('@sentry/webpack-plugin')
1414
15- const {
16- NEXT_PUBLIC_SENTRY_DSN : SENTRY_DSN ,
17- SENTRY_ORG ,
18- SENTRY_PROJECT ,
19- SENTRY_AUTH_TOKEN ,
20- NODE_ENV ,
21- } = process . env
15+ // const {
16+ // NEXT_PUBLIC_SENTRY_DSN: SENTRY_DSN,
17+ // SENTRY_ORG,
18+ // SENTRY_PROJECT,
19+ // SENTRY_AUTH_TOKEN,
20+ // NODE_ENV,
21+ // } = process.env
2222
23- process . env . SENTRY_DSN = SENTRY_DSN
23+ // process.env.SENTRY_DSN = SENTRY_DSN
2424
2525// next-plugins end
2626
@@ -34,38 +34,6 @@ const nextConfig = {
3434 new webpack . ContextReplacementPlugin ( / m o m e n t [ / \\ ] l o c a l e $ / , / ( e n ) / ) ,
3535 )
3636
37- // for sentry
38- config . plugins . push (
39- new webpack . DefinePlugin ( {
40- 'process.env.SENTRY_RELEASE' : JSON . stringify ( buildId ) ,
41- } ) ,
42- )
43- if ( ! isServer ) {
44- config . resolve . alias [ '@sentry/node' ] = '@sentry/browser'
45- }
46-
47- // When all the Sentry configuration env variables are available/configured
48- // The Sentry webpack plugin gets pushed to the webpack plugins to build
49- // and upload the source maps to sentry.
50- // This is an alternative to manually uploading the source maps
51- // Note: This is disabled in development mode.
52- if (
53- SENTRY_DSN &&
54- SENTRY_ORG &&
55- SENTRY_PROJECT &&
56- SENTRY_AUTH_TOKEN &&
57- NODE_ENV === 'production'
58- ) {
59- config . plugins . push (
60- new SentryWebpackPlugin ( {
61- include : '.next' ,
62- ignore : [ 'node_modules' ] ,
63- urlPrefix : '~/_next' ,
64- release : buildId ,
65- } ) ,
66- )
67- }
68-
6937 return config
7038 } ,
7139}
0 commit comments