-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
91 lines (86 loc) · 2.12 KB
/
next.config.mjs
File metadata and controls
91 lines (86 loc) · 2.12 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
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
85
86
87
88
89
90
/** @type {import('next').NextConfig} */
const nextConfig = {
// Configurazione specifica per metadati social
experimental: {
optimizePackageImports: ['@multiversx/sdk-dapp', '@multiversx/sdk-dapp-ui'],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'media.elrond.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'ipfs.io',
pathname: '/**',
},
{
protocol: 'https',
hostname: '*.ipfs.nftstorage.link',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'media.oox.art',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'fevkctpkfn5okuuh.public.blob.vercel-storage.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'picsum.photos',
pathname: '/**',
}
],
// Ottimizzazioni per le immagini pesanti da IPFS
formats: ['image/webp', 'image/avif'],
minimumCacheTTL: 60 * 60 * 24 * 30, // Cache per 30 giorni
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
dangerouslyAllowSVG: false,
contentDispositionType: 'attachment',
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
transpilePackages: [
'@multiversx/sdk-dapp',
'@multiversx/sdk-dapp-ui',
'@multiversx/sdk-core',
'@multiversx/sdk-bls-wasm'
],
webpack: (config, { isServer }) => {
config.cache = {
type: 'memory',
};
config.resolve.alias['@'] = process.cwd();
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
os: false,
buffer: false,
net: false,
tls: false,
stream: false,
url: false,
crypto: false,
};
}
config.externals.push(
'pino-pretty',
'lokijs',
'encoding',
{
bufferutil: 'bufferutil',
'utf-8-validate': 'utf-8-validate',
}
);
return config;
},
};
export default nextConfig;