openoperator / next.config.ts
Leon4gr45's picture
Exclude undici from client bundle
375cedc verified
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'www.google.com',
},
],
},
webpack: (config, { isServer }) => {
if (!isServer) {
config.externals = [...config.externals, 'undici'];
}
return config;
},
};
export default nextConfig;