mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-22 08:02:09 +03:00
build: support sourcemap in sentry (#1910)
This commit is contained in:
parent
1162bffb30
commit
2bcda973d3
@ -20,4 +20,6 @@ ENABLE_CHANGELOG=1
|
||||
|
||||
# Sentry
|
||||
SENTRY_AUTH_TOKEN=
|
||||
SENTRY_ORG=
|
||||
SENTRY_PROJECT=
|
||||
NEXT_PUBLIC_SENTRY_DSN=
|
||||
|
@ -4,6 +4,7 @@ import path from 'node:path';
|
||||
|
||||
import { PerfseePlugin } from '@perfsee/webpack';
|
||||
import { withSentryConfig } from '@sentry/nextjs';
|
||||
import SentryWebpackPlugin from '@sentry/webpack-plugin';
|
||||
import debugLocal from 'next-debug-local';
|
||||
|
||||
import preset from './preset.config.mjs';
|
||||
@ -113,6 +114,19 @@ const nextConfig = {
|
||||
config.plugins = [perfsee];
|
||||
}
|
||||
}
|
||||
if (
|
||||
process.env.SENTRY_AUTH_TOKEN &&
|
||||
process.env.SENTRY_ORG &&
|
||||
process.env.SENTRY_PROJECT
|
||||
) {
|
||||
config.plugins.push(
|
||||
new SentryWebpackPlugin({
|
||||
include: '.next',
|
||||
ignore: ['node_modules', 'cypress', 'test'],
|
||||
urlPrefix: '~/_next',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
|
@ -50,6 +50,7 @@
|
||||
"@perfsee/webpack": "^1.5.0",
|
||||
"@redux-devtools/extension": "^3.2.5",
|
||||
"@rich-data/viewer": "^2.15.6",
|
||||
"@sentry/webpack-plugin": "^1.20.0",
|
||||
"@swc-jotai/debug-label": "^0.0.9",
|
||||
"@swc-jotai/react-refresh": "^0.0.7",
|
||||
"@types/react": "=18.0.31",
|
||||
|
@ -198,6 +198,7 @@ __metadata:
|
||||
"@redux-devtools/extension": ^3.2.5
|
||||
"@rich-data/viewer": ^2.15.6
|
||||
"@sentry/nextjs": ^7.47.0
|
||||
"@sentry/webpack-plugin": ^1.20.0
|
||||
"@swc-jotai/debug-label": ^0.0.9
|
||||
"@swc-jotai/react-refresh": ^0.0.7
|
||||
"@toeverything/hooks": "workspace:*"
|
||||
@ -4950,7 +4951,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@sentry/webpack-plugin@npm:1.20.0":
|
||||
"@sentry/webpack-plugin@npm:1.20.0, @sentry/webpack-plugin@npm:^1.20.0":
|
||||
version: 1.20.0
|
||||
resolution: "@sentry/webpack-plugin@npm:1.20.0"
|
||||
dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user