-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
59 lines (49 loc) · 1.62 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const { withSentryConfig } = require('@sentry/nextjs');
const withBundleAnalyzer = require('@next/bundle-analyzer');
const withPWA = require('next-pwa')({
dest: 'public',
});
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
// distDir: 'build',
};
/**
*
* @see https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#extend-your-nextjs-configuration
*/
const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, configFile, stripPrefix, urlPrefix, include, ignore
org: 'example-org',
project: 'example-project',
// An auth token is required for uploading source maps.
// You can get an auth token from https://sentry.io/settings/account/api/auth-tokens/
// The token must have `project:releases` and `org:read` scopes for uploading source maps
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};
const sentryOptions = {
hideSourceMaps: true,
};
const withBundleAnalyzerOptions = { enabled: process.env.ANALYZE === 'true' };
const config = withBundleAnalyzer(withBundleAnalyzerOptions)(
nextConfig
);
// const sentryConfig = withSentryConfig(nextConfig, sentryWebpackPluginOptions, sentryOptions);
module.exports = withPWA(config);