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,21 +29,27 @@ const config = {
},
};
const bundleAnalyzerConfig = withBundleAnalyzer(config);
const configExport = () => {
if (process.env.ANALYZE === "true") return withBundleAnalyzer(config);
const sentryConfig = withSentryConfig(
config,
{
silent: true,
org: "aykut-sarac",
project: "json-crack",
},
{
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
disableServerWebpackPlugin: true,
if (process.env.GITHUB_REPOSITORY === "AykutSarac/jsoncrack.com") {
return withSentryConfig(
config,
{
silent: true,
org: "aykut-sarac",
project: "json-crack",
},
{
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
disableServerWebpackPlugin: true,
}
);
}
);
module.exports = process.env.ANALYZE === "true" ? bundleAnalyzerConfig : sentryConfig;
return config;
};
module.exports = configExport();