-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.js
More file actions
63 lines (61 loc) · 1.56 KB
/
next.config.js
File metadata and controls
63 lines (61 loc) · 1.56 KB
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
60
61
62
63
const { withSentryConfig } = require("@sentry/nextjs");
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
instrumentationHook: true,
},
async redirects() {
return [
{
source: "/design/components",
destination: "/design",
permanent: true,
},
{
source: "/design/core",
destination: "/design",
permanent: true,
},
{
source: "/btc-deposit-flow",
destination: "/guides/btc-deposit-flow.html",
permanent: false,
},
{
source: "/dex-operations",
destination: "/guides/dex-operations.html",
permanent: false,
},
{
source: "/lend-to-twilight-pool",
destination: "/guides/lend-to-twilight-pool.html",
permanent: false,
},
];
},
transpilePackages: ["klinecharts"],
webpack: (config) => {
config.externals.push(
// nextjs bundler cant correctly resolve deeply nested client and server dependencies, temporary fix
"pino-pretty",
"lokijs",
"bufferutil",
"utf-8-validate"
);
config.experiments = { asyncWebAssembly: true, layers: true };
// Suppress warnings from third-party packages
config.ignoreWarnings = [
{ module: /node_modules\/@selfxyz\/anon-aadhaar-core/ },
{ module: /node_modules\/web-worker/ },
{ module: /node_modules\/node-fetch/ },
];
return config;
},
};
module.exports = withSentryConfig(nextConfig, {
silent: true,
telemetry: false,
sourcemaps: {
disable: true,
},
});