forked from solana-labs/governance-ui
-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
31 lines (29 loc) · 878 Bytes
/
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
// 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,
},
})
)