perf: completely remove withSentryConfig from next.config.mjs to drop 170KB unused JS and legacy Array.from polyfills from the client bundle

This commit is contained in:
2026-06-27 08:30:42 +02:00
parent 09d0395233
commit 3b16dbe08d

View File

@@ -558,19 +558,8 @@ import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin();
resolvedConfig = withNextIntl(resolvedConfig);
resolvedConfig = withSentryConfig(
resolvedConfig,
{
silent: !process.env.CI,
treeshake: { removeDebugLogging: true },
},
{
disableClientWebpackPlugin: true,
autoInstrumentServerFunctions: false,
autoInstrumentMiddleware: false,
autoInstrumentAppDirectory: false,
}
);
// Removed withSentryConfig completely to eliminate the 170KB client-side bloat and Array.from legacy polyfill.
// Server-side instrumentation is still handled manually in instrumentation.ts.
// Manually merge baseNextConfig properties
const finalConfig = {