-
Notifications
You must be signed in to change notification settings - Fork 20
/
next.config.js
35 lines (28 loc) · 1.06 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
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require('@sentry/nextjs');
/** @type {import('next').NextConfig} */
const path = require('path');
const transpiled = require('next-transpile-modules')(['echarts', 'zrender']);
const nextConfig = {
reactStrictMode: true,
productionBrowserSourceMaps: true,
webpack(config) {
config.resolve.alias['~'] = path.join(__dirname, 'src');
return config;
},
sentry: { hideSourcemaps: true, autoInstrumentServerFunctions: false },
async redirects() {
return [
{
source: '/discord',
destination: 'https://discord.gg/kbPnYJjvwZ',
permanent: false,
},
];
},
};
const sentryWebpackPluginOptions = { silent: true };
module.exports = withSentryConfig(transpiled(nextConfig), sentryWebpackPluginOptions);