Skip to content

Commit

Permalink
feat: update next config for better local hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
AykutSarac committed Dec 3, 2024
1 parent d369af6 commit a046ef4
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit a046ef4

Please sign in to comment.