-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
38 lines (37 loc) · 1.04 KB
/
next.config.js
File metadata and controls
38 lines (37 loc) · 1.04 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
module.exports = {
output: 'standalone',
swcMinify: true,
trailingSlash: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**',
},
],
},
onDemandEntries: {
// period (in ms) where the server will keep pages in the buffer
maxInactiveAge: 120 * 1000,
// number of pages that should be kept simultaneously without being disposed
pagesBufferLength: 3,
},
async headers() {
return [
{
source: '/(.*)',
headers: [
// Prevents the page from being loaded in an iframe (clickjacking prevention)
{ key: 'Content-Security-Policy', value: `frame-ancestors 'none';` },
],
},
]
},
webpack: (config) => {
// https://github.com/rainbow-me/rainbowkit/blob/main/examples/with-next-app/next.config.js
// https://github.com/WalletConnect/walletconnect-monorepo/issues/1908
config.resolve.fallback = { fs: false, net: false, tls: false }
config.externals.push('pino-pretty', 'lokijs', 'encoding')
return config
},
}