49 lines
988 B
JavaScript
49 lines
988 B
JavaScript
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
|
|
|
const nextConfig = {
|
|
...(!!process.env.NEXT_PUBLIC_SENTRY_DSN && {
|
|
sentry: {
|
|
hideSourceMaps: true,
|
|
},
|
|
}),
|
|
reactStrictMode: false,
|
|
swcMinify: true,
|
|
compiler: {
|
|
styledComponents: true,
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "pbs.twimg.com",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "raw.githubusercontent.com",
|
|
},
|
|
{
|
|
protocol: "https",
|
|
hostname: "abs.twimg.com",
|
|
},
|
|
],
|
|
},
|
|
webpack(config) {
|
|
config.module.rules.push({
|
|
test: /\.svg$/i,
|
|
issuer: /\.[jt]sx?$/,
|
|
use: ["@svgr/webpack"],
|
|
});
|
|
|
|
return config;
|
|
},
|
|
};
|
|
|
|
const sentryWebpackPluginOptions = {
|
|
silent: true,
|
|
};
|
|
|
|
module.exports = !!process.env.NEXT_PUBLIC_SENTRY_DSN
|
|
? withSentryConfig(nextConfig, sentryWebpackPluginOptions)
|
|
: nextConfig;
|