Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
54bb309d
Unverified
Commit
54bb309d
authored
May 30, 2023
by
Joel
Committed by
GitHub
May 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove sentry for community edtion and dev (#259)
parent
75f7a960
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
next.config.js
web/next.config.js
+13
-5
No files found.
web/next.config.js
View file @
54bb309d
const
{
withSentryConfig
}
=
require
(
'@sentry/nextjs'
)
const
EDITION
=
process
.
env
.
NEXT_PUBLIC_EDITION
const
IS_CE_EDITION
=
EDITION
===
'SELF_HOSTED'
const
isDevelopment
=
process
.
env
.
NODE_ENV
===
'development'
const
isHideSentry
=
isDevelopment
||
IS_CE_EDITION
const
withMDX
=
require
(
'@next/mdx'
)({
extension
:
/
\.
mdx
?
$/
,
options
:
{
...
...
@@ -31,9 +36,6 @@ const nextConfig = {
// https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
ignoreBuildErrors
:
true
,
},
sentry
:
{
hideSourceMaps
:
true
,
},
async
redirects
()
{
return
[
{
...
...
@@ -43,6 +45,13 @@ const nextConfig = {
},
]
},
...(
isHideSentry
?
{}
:
{
sentry
:
{
hideSourceMaps
:
true
,
},
}),
}
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
...
...
@@ -54,8 +63,7 @@ const sentryWebpackPluginOptions = {
assets
:
'./**'
,
ignore
:
[
'./node_modules/**'
],
},
// https://github.com/getsentry/sentry-webpack-plugin#options.
}
module
.
exports
=
withMDX
(
withSentryConfig
(
nextConfig
,
sentryWebpackPluginOptions
))
module
.
exports
=
isHideSentry
?
withMDX
(
nextConfig
)
:
withMDX
(
withSentryConfig
(
nextConfig
,
sentryWebpackPluginOptions
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment