forked from cruewatene/sol-nft-tools
-
Notifications
You must be signed in to change notification settings - Fork 16
/
next.config.js
84 lines (80 loc) · 2.13 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
const withPlugins = require("next-compose-plugins");
/** eslint-disable @typescript-eslint/no-var-requires */
const withTM = require("next-transpile-modules")([
"@solana/wallet-adapter-base",
// Uncomment wallets you want to use
// "@solana/wallet-adapter-bitpie",
// "@solana/wallet-adapter-coin98",
"@solana/wallet-adapter-ledger",
// "@solana/wallet-adapter-mathwallet",
"@solana/wallet-adapter-phantom",
"@solana/wallet-adapter-react",
"@solana/wallet-adapter-solflare",
"@solana/wallet-adapter-sollet",
// "@solana/wallet-adapter-solong",
// "@solana/wallet-adapter-torus",
"@solana/wallet-adapter-wallets",
// "@project-serum/sol-wallet-adapter",
// "@solana/wallet-adapter-ant-design",
]);
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
/** @type {import('next').NextConfig} */
const config = {
images: {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
domains: ["arweave.net", "www.arweave.net", "raw.githubusercontent.com", "ipfs.io", "shdw-drive.genesysgo.net"],
},
reactStrictMode: true,
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}
return config;
},
async redirects() {
return [
{
source: "/get-mints",
destination: "/nft-mints",
permanent: false,
},
{
source: "/get-nft-mints",
destination: "/nft-mints",
permanent: false,
},
{
source: "/",
destination: "/nft-mints",
permanent: false,
},
{
source: "/get-meta",
destination: "/token-metadata",
permanent: true,
},
{
source: "/get-ar-links",
destination: "/",
permanent: true,
},
{
source: "/get-minters",
destination: "/nft-minters",
permanent: true,
},
{
source: "/get-holders",
destination: "/holder-snapshot",
permanent: true,
},
];
},
};
module.exports = withPlugins(
[withTM, withBundleAnalyzer],
config
)