feat: update next config for better local hosting

This commit is contained in:
AykutSarac 2024-12-04 00:17:15 +03:00
parent d369af67d4
commit a046ef4a16
No known key found for this signature in database

View File

@ -29,9 +29,11 @@ const config = {
}, },
}; };
const bundleAnalyzerConfig = withBundleAnalyzer(config); const configExport = () => {
if (process.env.ANALYZE === "true") return withBundleAnalyzer(config);
const sentryConfig = withSentryConfig( if (process.env.GITHUB_REPOSITORY === "AykutSarac/jsoncrack.com") {
return withSentryConfig(
config, config,
{ {
silent: true, silent: true,
@ -45,5 +47,9 @@ const sentryConfig = withSentryConfig(
disableServerWebpackPlugin: true, disableServerWebpackPlugin: true,
} }
); );
}
module.exports = process.env.ANALYZE === "true" ? bundleAnalyzerConfig : sentryConfig; return config;
};
module.exports = configExport();