-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
35 lines (32 loc) · 837 Bytes
/
next.config.mjs
File metadata and controls
35 lines (32 loc) · 837 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
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config, { isServer }) => {
// Handle bitcore-lib conflicts
config.resolve.fallback = {
...config.resolve.fallback,
crypto: false,
stream: false,
buffer: false,
}
// Ignore specific modules that cause conflicts on server side
if (isServer) {
config.externals = [...(config.externals || []), 'bitcore-lib']
}
return config
},
experimental: {
esmExternals: true,
},
// Enable compression
compress: true,
// Performance optimizations
swcMinify: true,
// Reduce bundle size by removing unused code
modularizeImports: {
'lucide-react': {
transform: 'lucide-react/dist/esm/icons/{{kebabCase member}}',
skipDefaultConversion: true,
},
},
}
export default nextConfig