@netlify/plugin-nextjs
Advanced tools
Comparing version 5.9.3-background-debug-logs.0 to 5.9.3
@@ -8,4 +8,13 @@ | ||
import { | ||
clearStaleEdgeHandlers, | ||
createEdgeHandlers | ||
} from "./esm-chunks/chunk-HGXG447M.js"; | ||
import { | ||
clearStaleServerHandlers, | ||
createServerHandler | ||
} from "./esm-chunks/chunk-DLVROEVU.js"; | ||
import { | ||
copyPrerenderedContent | ||
} from "./esm-chunks/chunk-J4D25YDX.js"; | ||
import "./esm-chunks/chunk-IJZEDP6B.js"; | ||
import { | ||
@@ -19,11 +28,2 @@ copyStaticAssets, | ||
import { | ||
clearStaleEdgeHandlers, | ||
createEdgeHandlers | ||
} from "./esm-chunks/chunk-HGXG447M.js"; | ||
import { | ||
clearStaleServerHandlers, | ||
createServerHandler | ||
} from "./esm-chunks/chunk-DLVROEVU.js"; | ||
import "./esm-chunks/chunk-IJZEDP6B.js"; | ||
import { | ||
wrapTracer | ||
@@ -30,0 +30,0 @@ } from "./esm-chunks/chunk-5QSXBV7L.js"; |
@@ -9,3 +9,3 @@ | ||
nextResponseProxy | ||
} from "../esm-chunks/chunk-5N54G5SN.js"; | ||
} from "../esm-chunks/chunk-XS27YRA5.js"; | ||
import "../esm-chunks/chunk-OEQOKJGE.js"; | ||
@@ -12,0 +12,0 @@ export { |
@@ -17,2 +17,4 @@ import type { Context } from '@netlify/edge-functions' | ||
relativizeURL, | ||
removeBasePath, | ||
rewriteDataPath, | ||
} from './util.ts' | ||
@@ -184,10 +186,12 @@ | ||
if (isDataReq) { | ||
// The rewrite target is a data request, but a middleware rewrite target is always for the page route, | ||
// so we need to tell the server this is a data request. Setting the `x-nextjs-data` header is not enough. 🤷 | ||
rewriteUrl.searchParams.set('__nextDataReq', '1') | ||
rewriteUrl.pathname = rewriteDataPath({ | ||
dataUrl: new URL(request.url).pathname, | ||
newRoute: removeBasePath(rewriteUrl.pathname, nextConfig?.basePath), | ||
basePath: nextConfig?.basePath, | ||
}) | ||
} else { | ||
// respect trailing slash rules to prevent 308s | ||
rewriteUrl.pathname = normalizeTrailingSlash(rewriteUrl.pathname, nextConfig?.trailingSlash) | ||
} | ||
// respect trailing slash rules to prevent 308s | ||
rewriteUrl.pathname = normalizeTrailingSlash(rewriteUrl.pathname, nextConfig?.trailingSlash) | ||
const target = normalizeLocalizedTarget({ target: rewriteUrl.toString(), request, nextConfig }) | ||
@@ -194,0 +198,0 @@ if (target === request.url) { |
{ | ||
"name": "@netlify/plugin-nextjs", | ||
"version": "5.9.3-background-debug-logs.0", | ||
"version": "5.9.3", | ||
"description": "Run Next.js seamlessly on Netlify", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
5997215
142458