docs: document why cacheComponents stays disabled
Enabling cacheComponents fails the build (/_not-found: uncached data outside <Suspense>) because the multi-domain layout reads headers() (host) in layout + generateMetadata. Safe adoption would need broad Suspense boundaries and risks cross-domain city content leakage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,10 @@ const nextConfig = {
|
|||||||
htmlLimitedBots: /.*/,
|
htmlLimitedBots: /.*/,
|
||||||
// React Compiler (پایدار در Next 16) — memoization خودکار کامپوننتها.
|
// React Compiler (پایدار در Next 16) — memoization خودکار کامپوننتها.
|
||||||
reactCompiler: true,
|
reactCompiler: true,
|
||||||
|
// نکته: cacheComponents فعال نشد. معماری multi-domain به headers() (هدر host) در
|
||||||
|
// layout و generateMetadata وابسته است؛ با cacheComponents هر دسترسی uncached به
|
||||||
|
// headers() باید داخل <Suspense> بسته شود (build روی /_not-found شکست خورد). این کار
|
||||||
|
// نیازمند Suspenseگذاری گسترده و ریسک نشت محتوای شهر بین دامنههاست — فعلاً امن نیست.
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user