@vercel/next
Advanced tools
Comparing version 4.0.12 to 4.0.13
@@ -15,5 +15,5 @@ "use strict"; | ||
const NextServer = require("__NEXT_SERVER_PATH__").default; | ||
const conf = __NEXT_CONFIG__; | ||
const nextServer = new NextServer({ | ||
// @ts-ignore __NEXT_CONFIG__ value is injected | ||
conf: __NEXT_CONFIG__, | ||
conf, | ||
dir: ".", | ||
@@ -23,7 +23,6 @@ minimalMode: true, | ||
}); | ||
const requestHandler = nextServer.getRequestHandler(); | ||
module.exports = async (req, res) => { | ||
const serve = (handler) => async (req, res) => { | ||
try { | ||
// @preserve entryDirectory handler | ||
await requestHandler(req, res); | ||
await handler(req, res); | ||
} catch (err) { | ||
@@ -34,1 +33,5 @@ console.error(err); | ||
}; | ||
module.exports = serve(nextServer.getRequestHandler()); | ||
if (conf.experimental?.ppr && "getRequestHandlerWithMetadata" in nextServer && typeof nextServer.getRequestHandlerWithMetadata === "function") { | ||
module.exports.getRequestHandlerWithMetadata = (metadata) => serve(nextServer.getRequestHandlerWithMetadata(metadata)); | ||
} |
{ | ||
"name": "@vercel/next", | ||
"version": "4.0.12", | ||
"version": "4.0.13", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
557126
15527