-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
49 lines (41 loc) · 1.3 KB
/
next.config.ts
File metadata and controls
49 lines (41 loc) · 1.3 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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Legacy Express server files (backend/app.ts, backend/routes.ts) are preserved
// for upstream compatibility but not used in Next.js API routes.
// @types/express is installed as dev dependency for TypeScript type checking.
// Turbopack configuration
turbopack: {},
// Webpack configuration (fallback for non-Turbopack builds)
webpack: (config, { isServer }) => {
// Fix for Thirdweb ESM modules
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
fs: false,
net: false,
tls: false,
};
}
// Handle ESM modules from Thirdweb - allow fullySpecified: false
config.module = {
...config.module,
rules: [
...(config.module?.rules || []),
{
test: /node_modules\/thirdweb\/.*\.m?js$/,
resolve: {
fullySpecified: false,
},
},
],
};
return config;
},
// Exclude test scripts and other non-production files from TypeScript checking
typescript: {
ignoreBuildErrors: false,
},
// Note: serverExternalPackages removed for thirdweb - it must be bundled
// so it shares the same React instance as Next.js during SSR
};
export default nextConfig;