disable sentry if next phase is PHASE_DEVELOPMENT_SERVER
This commit is contained in:
parent
4cdc93e345
commit
4b14427f36
|
@ -4,6 +4,7 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
|
||||||
const withWorkbox = require('@ente-io/next-with-workbox');
|
const withWorkbox = require('@ente-io/next-with-workbox');
|
||||||
|
|
||||||
const { withSentryConfig } = require('@sentry/nextjs');
|
const { withSentryConfig } = require('@sentry/nextjs');
|
||||||
|
const { PHASE_DEVELOPMENT_SERVER } = require('next/constants');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
getGitSha,
|
getGitSha,
|
||||||
|
@ -21,7 +22,8 @@ const GIT_SHA = getGitSha();
|
||||||
|
|
||||||
const IS_SENTRY_ENABLED = getIsSentryEnabled();
|
const IS_SENTRY_ENABLED = getIsSentryEnabled();
|
||||||
|
|
||||||
module.exports = withSentryConfig(
|
module.exports = (phase) =>
|
||||||
|
withSentryConfig(
|
||||||
withWorkbox(
|
withWorkbox(
|
||||||
withBundleAnalyzer({
|
withBundleAnalyzer({
|
||||||
env: {
|
env: {
|
||||||
|
@ -53,6 +55,6 @@ module.exports = withSentryConfig(
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
release: GIT_SHA,
|
release: GIT_SHA,
|
||||||
dryRun: !IS_SENTRY_ENABLED,
|
dryRun: phase === PHASE_DEVELOPMENT_SERVER || !IS_SENTRY_ENABLED,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue