Template
Initial commit
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F22Ms5Cxam5UHyxaCrtZzu
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
/**
|
||||
* Next.js 16 config for the Hydrogen example.
|
||||
*
|
||||
* `cacheComponents: true` enables Cache Components / `use cache` (engineering.md
|
||||
* F2 native Next caching instead of the Oxygen sub-request LRU).
|
||||
*
|
||||
* No `next/image` remote patterns — we use plain `<img>` + the `hydrogen-image`
|
||||
* helper (F12; Hydrogen ships no Image component and we size CDN URLs ourselves).
|
||||
*/
|
||||
const nextConfig: NextConfig = {
|
||||
cacheComponents: true,
|
||||
// React Strict Mode is disabled because `@shopify/hydrogen/react`'s
|
||||
// `PredictiveSearchProvider` destroys its store in the Strict Mode effect
|
||||
// cleanup (double-invoke), and `useMemo` returns the same (now-destroyed)
|
||||
// store instance for the second mount — so the predictive search store is
|
||||
// permanently `destroyed` and `store.search()` no-ops, breaking header
|
||||
// autocomplete. Disabling Strict Mode avoids the destroy; the cart provider
|
||||
// is unaffected (it recreates its store). Re-enable once the provider is
|
||||
// Strict-Mode-safe upstream.
|
||||
reactStrictMode: false,
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user