forked from UXDProtocol/governance-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
40 lines (38 loc) · 1.04 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
// workaround for ESM module loader errors
// see https://github.com/vercel/next.js/issues/25454
const withTM = require('next-transpile-modules')([
'react-markdown',
'@solana/wallet-adapter-base',
'@solana/wallet-adapter-phantom',
'@solana/wallet-adapter-sollet',
]);
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
module.exports = withBundleAnalyzer(
withTM({
webpack: (config, { isServer }) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
if (!isServer) config.resolve.fallback.fs = false;
return config;
},
env: {
REALM: process.env.REALM,
MAINNET_RPC: process.env.MAINNET_RPC,
DEVNET_RPC: process.env.DEVNET_RPC,
DEFAULT_GOVERNANCE_PROGRAM_ID: process.env.DEFAULT_GOVERNANCE_PROGRAM_ID,
},
async redirects() {
return [
{
source: '/dao/UXD/:path*',
destination: '/dao/UXP/:path*',
permanent: true,
},
];
},
}),
);