Spaces:
Build error
Build error
Exclude undici from client bundle
Browse files- next.config.ts +6 -0
next.config.ts
CHANGED
|
@@ -9,6 +9,12 @@ const nextConfig: NextConfig = {
|
|
| 9 |
},
|
| 10 |
],
|
| 11 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
};
|
| 13 |
|
| 14 |
export default nextConfig;
|
|
|
|
| 9 |
},
|
| 10 |
],
|
| 11 |
},
|
| 12 |
+
webpack: (config, { isServer }) => {
|
| 13 |
+
if (!isServer) {
|
| 14 |
+
config.externals = [...config.externals, 'undici'];
|
| 15 |
+
}
|
| 16 |
+
return config;
|
| 17 |
+
},
|
| 18 |
};
|
| 19 |
|
| 20 |
export default nextConfig;
|