forked from killthebuddh4/relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
35 lines (32 loc) · 1.14 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* eslint-disable-next-line */
const { withSentryConfig } = require('@sentry/nextjs');
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
// TODO Not sure how we want to handle this. We can't add every possible
// domain here for, say, ENS avatars.
domains: ['ipfs.io', 'prod-metadata.s3.amazonaws.com', 'gateway.ipfs.io'],
},
reactStrictMode: true,
compiler: {
styledComponents: true,
},
sentry: {
disableServerWebpackPlugin: Boolean(process.env.SKIP_SENTRY),
disableClientWebpackPlugin: Boolean(process.env.SKIP_SENTRY),
},
webpack: (config, { isServer }) => {
if (!isServer) {
// Fixes npm packages that depend on `fs` module
// https://github.com/vercel/next.js/issues/7755#issuecomment-937721514
config.resolve.fallback.fs = false;
}
return config;
},
};
const sentryWebpackPluginOptions = {
silent: true, // Suppresses all logs
};
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions);