-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathnext.config.js
40 lines (37 loc) · 1.11 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
36
37
38
39
40
const { withSentryConfig } = require('@sentry/nextjs');
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true,
},
poweredByHeader: false,
swcMinify: true,
productionBrowserSourceMaps: process.env.NODE_ENV === 'production',
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
images: {
domains: ['dev-to-uploads.s3.amazonaws.com', 'cdn.sanity.io'],
},
publicRuntimeConfig: {
sanityProjectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID || '',
sanityDataset: process.env.NEXT_PUBLIC_SANITY_DATASET || '',
sanityApiVersion: process.env.NEXT_PUBLIC_SANITY_API_VERSION || '',
mailchimpAudienceId: process.env.NEXT_PUBLIC_MAILCHIMP_AUDIENCE_ID || '',
mailchimpApiServer: process.env.NEXT_PUBLIC_MAILCHIMP_API_SERVER || '',
},
serverRuntimeConfig: {
sanityApiToken: process.env.SANITY_API_TOKEN || '',
mailchimpApiKey: process.env.MAILCHIMP_API_KEY || '',
sendgridApiKey: process.env.SENDGRID_API_KEY || '',
},
};
module.exports = withSentryConfig(
nextConfig,
{ silent: true },
{ hideSourceMaps: true }
);