Skip to content

Commit a046ef4

Browse files
committed
feat: update next config for better local hosting
1 parent d369af6 commit a046ef4

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

next.config.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,27 @@ const config = {
2929
},
3030
};
3131

32-
const bundleAnalyzerConfig = withBundleAnalyzer(config);
32+
const configExport = () => {
33+
if (process.env.ANALYZE === "true") return withBundleAnalyzer(config);
3334

34-
const sentryConfig = withSentryConfig(
35-
config,
36-
{
37-
silent: true,
38-
org: "aykut-sarac",
39-
project: "json-crack",
40-
},
41-
{
42-
widenClientFileUpload: true,
43-
hideSourceMaps: true,
44-
disableLogger: true,
45-
disableServerWebpackPlugin: true,
35+
if (process.env.GITHUB_REPOSITORY === "AykutSarac/jsoncrack.com") {
36+
return withSentryConfig(
37+
config,
38+
{
39+
silent: true,
40+
org: "aykut-sarac",
41+
project: "json-crack",
42+
},
43+
{
44+
widenClientFileUpload: true,
45+
hideSourceMaps: true,
46+
disableLogger: true,
47+
disableServerWebpackPlugin: true,
48+
}
49+
);
4650
}
47-
);
4851

49-
module.exports = process.env.ANALYZE === "true" ? bundleAnalyzerConfig : sentryConfig;
52+
return config;
53+
};
54+
55+
module.exports = configExport();

0 commit comments

Comments
 (0)