Template
Turn the optimizer back on by dropping images.unoptimized, and widen the Shopify remote pattern to **.shopify.com so any image subdomain resolves. With the optimizer live, remotePatterns is now actually enforced. Convert the seven Shopify CDN call sites: the product/collection cards and the gallery carousel size with fill + sizes, while the cart, order and search thumbnails carry explicit dimensions. The avatar, markdown, attachment, assistant and logo images stay plain <img> — they take blob:/data: or arbitrary hosts that next/image cannot process. The lightbox needs w-auto h-auto: the width and height attributes next/image requires make both axes definite, so max-w/max-h clamp them independently instead of preserving the ratio. object-contain masked that, but the stretched element covered the overlay and ate the backdrop clicks that close the dialog. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015uSQQNWrmiYDRW9L9VnsGC
33 lines
751 B
JavaScript
33 lines
751 B
JavaScript
export default {
|
|
reactStrictMode: true,
|
|
typescript: {
|
|
ignoreBuildErrors: true,
|
|
},
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: 'https',
|
|
hostname: 'images.unsplash.com',
|
|
},
|
|
// Covers cdn.shopify.com plus any other Shopify-hosted image subdomain.
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**.shopify.com',
|
|
},
|
|
{
|
|
protocol: 'https',
|
|
hostname: '**.frontend.co',
|
|
},
|
|
],
|
|
},
|
|
experimental: {
|
|
reactDebugChannel: false
|
|
},
|
|
webpack: (config, { isServer }) => {
|
|
config.cache = { type: "memory" };
|
|
if (isServer) {
|
|
config.optimization = config.optimization || {};
|
|
config.optimization.splitChunks = false;
|
|
} return config;
|
|
}
|
|
}; |