icns-frontend/next.config.js

49 lines
988 B
JavaScript
Raw Normal View History

2022-12-17 11:42:56 +00:00
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withSentryConfig } = require("@sentry/nextjs");
2022-11-30 08:11:45 +00:00
const nextConfig = {
2022-12-23 13:30:35 +00:00
...(!!process.env.NEXT_PUBLIC_SENTRY_DSN && {
sentry: {
hideSourceMaps: true,
},
}),
2022-12-01 08:33:37 +00:00
reactStrictMode: false,
2022-11-30 08:11:45 +00:00
swcMinify: true,
2022-12-06 10:41:38 +00:00
compiler: {
styledComponents: true,
},
2022-12-07 09:17:59 +00:00
images: {
remotePatterns: [
{
protocol: "https",
hostname: "pbs.twimg.com",
},
{
protocol: "https",
hostname: "raw.githubusercontent.com",
},
{
protocol: "https",
hostname: "abs.twimg.com",
},
2022-12-07 09:17:59 +00:00
],
},
2022-12-19 07:59:13 +00:00
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
});
return config;
},
2022-12-17 11:42:56 +00:00
};
const sentryWebpackPluginOptions = {
2022-12-17 14:45:50 +00:00
silent: true,
2022-12-01 08:33:37 +00:00
};
2022-11-30 08:11:45 +00:00
2022-12-20 13:39:23 +00:00
module.exports = !!process.env.NEXT_PUBLIC_SENTRY_DSN
? withSentryConfig(nextConfig, sentryWebpackPluginOptions)
: nextConfig;