jsoncrack.com/next.config.js
2023-11-26 14:51:21 +03:00

41 lines
861 B
JavaScript

const { withSentryConfig } = require("@sentry/nextjs");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
/**
* @type {import('next').NextConfig}
*/
const config = {
output: "export",
reactStrictMode: false,
productionBrowserSourceMaps: true,
compiler: {
styledComponents: true,
},
webpack: config => {
config.resolve.fallback = { fs: false };
return config;
},
};
const bundleAnalyzerConfig = withBundleAnalyzer(config);
const sentryConfig = 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;