@djangocfg/nextjs 2.1.474 → 2.1.476

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/nextjs",
3
- "version": "2.1.474",
3
+ "version": "2.1.476",
4
4
  "description": "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -144,9 +144,9 @@
144
144
  "ai-docs": "tsx src/ai/cli.ts"
145
145
  },
146
146
  "peerDependencies": {
147
- "@djangocfg/devtools": "^2.1.474",
148
- "@djangocfg/i18n": "^2.1.474",
149
- "@djangocfg/ui-core": "^2.1.474",
147
+ "@djangocfg/devtools": "^2.1.476",
148
+ "@djangocfg/i18n": "^2.1.476",
149
+ "@djangocfg/ui-core": "^2.1.476",
150
150
  "next": "^16.2.2"
151
151
  },
152
152
  "peerDependenciesMeta": {
@@ -168,11 +168,11 @@
168
168
  "serwist": "^9.5.11"
169
169
  },
170
170
  "devDependencies": {
171
- "@djangocfg/devtools": "^2.1.474",
172
- "@djangocfg/i18n": "^2.1.474",
173
- "@djangocfg/layouts": "^2.1.474",
174
- "@djangocfg/typescript-config": "^2.1.474",
175
- "@djangocfg/ui-core": "^2.1.474",
171
+ "@djangocfg/devtools": "^2.1.476",
172
+ "@djangocfg/i18n": "^2.1.476",
173
+ "@djangocfg/layouts": "^2.1.476",
174
+ "@djangocfg/typescript-config": "^2.1.476",
175
+ "@djangocfg/ui-core": "^2.1.476",
176
176
  "@types/node": "^25.9.5",
177
177
  "@types/react": "19.2.15",
178
178
  "@types/react-dom": "19.2.3",
@@ -329,33 +329,10 @@ export function createBaseNextConfig(
329
329
  return [...headers, ...userHeaders];
330
330
  },
331
331
 
332
- // Rewrites — first-party analytics ingest proxy, then user rewrites.
333
- //
334
- // @djangocfg/analytics POSTs to a RELATIVE /cfg/analytics/collect/ so the beacon
335
- // stays same-origin (sendBeacon is unreliable cross-origin). On a split-domain
336
- // deploy (Next on one host, Django on `apiUrl`) that same-origin path has no
337
- // route here, so every beacon 404s and nothing is ingested — unless we proxy it.
338
- // Same-domain and static builds keep apiUrl empty and need no proxy.
339
- ...(((apiUrl && !isStaticBuild) || options.rewrites)
340
- ? {
341
- async rewrites() {
342
- const analyticsProxy =
343
- apiUrl && !isStaticBuild
344
- ? [{ source: '/cfg/analytics/:path*', destination: `${apiUrl}/cfg/analytics/:path*` }]
345
- : [];
346
- const user = options.rewrites ? await options.rewrites() : [];
347
- // Ingest must resolve before any page/filesystem route can shadow it.
348
- if (Array.isArray(user)) {
349
- return { beforeFiles: analyticsProxy, afterFiles: user, fallback: [] };
350
- }
351
- return {
352
- beforeFiles: [...analyticsProxy, ...(user?.beforeFiles ?? [])],
353
- afterFiles: user?.afterFiles ?? [],
354
- fallback: user?.fallback ?? [],
355
- };
356
- },
357
- }
358
- : {}),
332
+ // Rewrites (user-provided only)
333
+ ...(options.rewrites && {
334
+ rewrites: options.rewrites,
335
+ }),
359
336
 
360
337
  // Redirects for URL normalization
361
338
  // Fixes "Failed to construct 'URL': Invalid URL" error with double slashes