jsoncrack.com/next.config.js

43 lines
993 B
JavaScript
Raw Normal View History

2023-05-22 11:49:38 +03:00
const { withSentryConfig } = require("@sentry/nextjs");
2023-07-16 15:44:10 +03:00
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
2023-01-29 19:45:09 +03:00
2022-04-27 13:56:24 +03:00
/**
* @type {import('next').NextConfig}
*/
2023-01-29 19:45:09 +03:00
const config = {
2023-07-16 15:44:10 +03:00
output: "export",
2022-12-11 14:27:07 +03:00
reactStrictMode: false,
2023-02-09 09:22:11 +03:00
productionBrowserSourceMaps: true,
2023-01-28 17:17:21 +03:00
compiler: {
2023-01-29 19:45:09 +03:00
styledComponents: true,
},
2023-11-26 14:51:21 +03:00
webpack: config => {
config.resolve.fallback = { fs: false };
2024-01-05 21:49:36 +03:00
config.output.webassemblyModuleFilename = "static/wasm/[modulehash].wasm";
config.experiments = { asyncWebAssembly: true };
2023-11-26 14:51:21 +03:00
return config;
},
2022-04-27 13:56:24 +03:00
};
2023-01-29 19:45:09 +03:00
2023-08-07 23:39:20 +03:00
const bundleAnalyzerConfig = withBundleAnalyzer(config);
const sentryConfig = withSentryConfig(
config,
{
silent: true,
org: "aykut-sarac",
project: "json-crack",
},
{
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
disableServerWebpackPlugin: true,
}
);
2024-05-06 21:53:19 +03:00
module.exports = process.env.ANALYZE === "true" ? bundleAnalyzerConfig : sentryConfig;