Skip to content

Commit 6e2bb58

Browse files
committed
remove sentry for building
1 parent 90856b1 commit 6e2bb58

File tree

3 files changed

+49
-12
lines changed

3 files changed

+49
-12
lines changed

next.config.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
// This file sets a custom webpack configuration to use your Next.js app
2-
// with Sentry.
3-
// https://nextjs.org/docs/api-reference/next.config.js/introduction
4-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
5-
import { withSentryConfig } from '@sentry/nextjs'
6-
71
/** @type {import('next').NextConfig} */
82
const nextConfig = {
93
// webpack: (config, { isServer, webpack }) => {
@@ -38,9 +32,3 @@ const nextConfig = {
3832
}
3933

4034
module.exports = nextConfig
41-
42-
module.exports = withSentryConfig(
43-
module.exports,
44-
{ silent: true },
45-
{ hideSourcemaps: true }
46-
)

next.config.withSentry.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// This file sets a custom webpack configuration to use your Next.js app
2+
// with Sentry.
3+
// https://nextjs.org/docs/api-reference/next.config.js/introduction
4+
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
5+
import { withSentryConfig } from '@sentry/nextjs'
6+
7+
/** @type {import('next').NextConfig} */
8+
const nextConfig = {
9+
// webpack: (config, { isServer, webpack }) => {
10+
// if (!isServer) {
11+
// // Ensures no server modules are included on the client.
12+
// config.plugins.push(new webpack.IgnorePlugin(/lib\/server/));
13+
// }
14+
15+
// return config;
16+
// }, reactStrictMode: true,
17+
swcMinify: true,
18+
compiler: {
19+
relay: {
20+
src: './',
21+
language: 'typescript',
22+
artifactDirectory: '__generated__',
23+
},
24+
},
25+
experimental: { appDir: true },
26+
async rewrites() {
27+
return [
28+
{
29+
source: '/@:handle([a-zA-Z0-9-_]+)/:id*',
30+
destination: '/users/:handle/:id*',
31+
},
32+
{
33+
source: '/story/:id([a-zA-Z0-9=+-/]+)___:suffix*',
34+
destination: '/story/:id',
35+
},
36+
]
37+
},
38+
}
39+
40+
module.exports = nextConfig
41+
42+
module.exports = withSentryConfig(
43+
module.exports,
44+
{ silent: true },
45+
{ hideSourcemaps: true }
46+
)

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,8 @@
101101
},
102102
"resolutions": {
103103
"webpack": "^5"
104+
},
105+
"engines": {
106+
"node": "17.5.0"
104107
}
105108
}

0 commit comments

Comments
 (0)