-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.ts
More file actions
59 lines (54 loc) · 1.49 KB
/
next.config.ts
File metadata and controls
59 lines (54 loc) · 1.49 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
import type { NextConfig } from "next";
import path from "path";
const nextConfig: NextConfig = {
images: {
domains: [
"images.unsplash.com",
"api.dicebear.com",
"flowscan.org",
"avatars.githubusercontent.com",
"res.cloudinary.com",
],
},
env: {
NEXT_PUBLIC_FLOW_NETWORK: process.env.NEXT_PUBLIC_FLOW_NETWORK || "testnet",
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL || "http://localhost:3000",
NEXT_PUBLIC_FUNGIBLE_TOKEN_ADDRESS: process.env.NEXT_PUBLIC_FLOW_NETWORK === "mainnet"
? "0xf233dcee88fe0abe"
: "0x9a0766d93b6608b7",
NEXT_PUBLIC_FLOW_TOKEN_ADDRESS: process.env.NEXT_PUBLIC_FLOW_NETWORK === "mainnet"
? "0x1654653399040a61"
: "0x7e60df042a9c0868",
},
webpack: (config, { isServer }) => {
// Add the Cadence loader first
config.module.rules.push({
test: /\.cdc$/,
type: 'asset/source',
});
// Add alias configuration
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, 'src'),
'@flow-wager': path.resolve(__dirname, 'flow-wager'),
};
// Only add fallback for client-side
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
}
return config;
},
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
pageExtensions: ['ts', 'tsx', 'js', 'jsx']
};
export default nextConfig;