-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.ts
More file actions
34 lines (31 loc) · 864 Bytes
/
next.config.ts
File metadata and controls
34 lines (31 loc) · 864 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
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Transpile Stacks packages to ensure compatibility with newer bundlers
transpilePackages: [
'@stacks/connect',
'@stacks/connect-react',
'@stacks/auth',
'@stacks/common',
'@stacks/encryption',
'@stacks/network',
'@stacks/profile',
'@stacks/storage',
'@stacks/transactions',
],
// Empty turbopack config to allow webpack fallbacks
turbopack: {},
// Webpack configuration to handle potential module issues
webpack: (config, { isServer }) => {
// Handle node: protocol imports that some Stacks packages use
if (!isServer) {
config.resolve.fallback = {
...config.resolve.fallback,
crypto: false,
stream: false,
buffer: false,
};
}
return config;
},
};
export default nextConfig;