-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
33 lines (29 loc) · 935 Bytes
/
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
const { withSentryConfig } = require('@sentry/nextjs');
const moduleExports = {
poweredByHeader: false,
swcMinify: true,
assetPrefix: process.env.ASSET_HOST || '',
productionBrowserSourceMaps: process.env.NODE_ENV === 'production',
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
publicRuntimeConfig: {
MAILCHIMP_API_KEY: process.env.MAILCHIMP_API_KEY || '',
MAILCHIMP_API_SERVER: process.env.MAILCHIMP_API_SERVER || '',
MAILCHIMP_AUDIENCE_ID: process.env.MAILCHIMP_AUDIENCE_ID || '',
},
images: {
domains: ['media.graphcms.com', 'media.graphassets.com'],
},
};
const sentryWebpackPluginOptions = {
silent: false, // Suppresses all logs
hideSourceMaps: true,
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);