forked from aave/interface
-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
34 lines (32 loc) · 912 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
32
33
34
// eslint-disable-next-line
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const pageExtensions = ['page.tsx'];
if (process.env.NEXT_PUBLIC_ENABLE_GOVERNANCE === 'true') pageExtensions.push('governance.tsx');
if (process.env.NEXT_PUBLIC_ENABLE_STAKING === 'true') pageExtensions.push('staking.tsx');
/** @type {import('next').NextConfig} */
module.exports = withBundleAnalyzer({
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: ['prefixIds'],
},
},
},
],
});
config.experiments = { topLevelAwait: true };
return config;
},
reactStrictMode: true,
// assetPrefix: "./",
trailingSlash: true,
pageExtensions,
});