mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
build: support sourcemap in sentry (#1910)
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user