-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnext.config.ts
More file actions
46 lines (41 loc) · 932 Bytes
/
next.config.ts
File metadata and controls
46 lines (41 loc) · 932 Bytes
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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async redirects() {
return [
{
source: '/flows',
destination: '/crosschain',
permanent: true,
},
{
source: '/tools/privacy-check',
destination: '/tools/blend-check',
permanent: true,
},
];
},
webpack: (config, { isServer }) => {
// Add WASM support
config.experiments = {
...config.experiments,
asyncWebAssembly: true,
layers: true,
};
// Handle .wasm files
config.module.rules.push({
test: /\.wasm$/,
type: 'webassembly/async',
});
// Ignore .wasm files in node_modules for client-side
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
path: false,
crypto: false,
};
}
return config;
},
};
export default nextConfig;