@edgeone/opennextjs-pages 0.1.5-beta.3 → 0.1.5-beta.4
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/dist/build/routes.js
CHANGED
|
@@ -89,12 +89,17 @@ function getDataRoutes(dataRoutes, basePath = "") {
|
|
|
89
89
|
}
|
|
90
90
|
return routes;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function getServerRoutes(staticRoutes, prerenderManifest, basePath = "") {
|
|
93
93
|
const routes = [];
|
|
94
|
+
const prerenderRoutes = prerenderManifest?.routes || {};
|
|
94
95
|
for (const route of staticRoutes) {
|
|
95
96
|
if (route.page.startsWith("/_")) {
|
|
96
97
|
continue;
|
|
97
98
|
}
|
|
99
|
+
const prerenderInfo = prerenderRoutes[route.page];
|
|
100
|
+
if (prerenderInfo && prerenderInfo.initialRevalidateSeconds === false) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
98
103
|
if (route.namedRegex) {
|
|
99
104
|
let src = convertNamedRegexToSrc(route.namedRegex, basePath);
|
|
100
105
|
if (src) {
|
|
@@ -241,6 +246,7 @@ var createRouteMeta = async (ctx) => {
|
|
|
241
246
|
const dataRoutes = routesManifest?.dataRoutes || [];
|
|
242
247
|
const staticRoutes = routesManifest?.staticRoutes || [];
|
|
243
248
|
const appPathsManifest = await ctx.getAppPathsManifest?.() || null;
|
|
249
|
+
const prerenderManifest = await ctx.getPrerenderManifest?.() || null;
|
|
244
250
|
const buildId = getBuildId(ctx);
|
|
245
251
|
const staticCacheRegex = buildId ? `^${basePath}/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|${buildId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})/.+` : `^${basePath}/_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media)/.+`;
|
|
246
252
|
routes.push({
|
|
@@ -328,7 +334,7 @@ var createRouteMeta = async (ctx) => {
|
|
|
328
334
|
}
|
|
329
335
|
}
|
|
330
336
|
if (staticRoutes.length > 0) {
|
|
331
|
-
routes.push(...
|
|
337
|
+
routes.push(...getServerRoutes(staticRoutes, prerenderManifest, basePath));
|
|
332
338
|
}
|
|
333
339
|
if (dynamicRoutes.length > 0) {
|
|
334
340
|
routes.push(...getDynamicRoutes(dynamicRoutes, basePath));
|
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(tags_handler_exports);
|
|
|
28
28
|
|
|
29
29
|
// package.json
|
|
30
30
|
var name = "@edgeone/opennextjs-pages";
|
|
31
|
-
var version = "0.1.5-beta.
|
|
31
|
+
var version = "0.1.5-beta.4";
|
|
32
32
|
|
|
33
33
|
// src/run/handlers/tags-handler.cts
|
|
34
34
|
var import_request_context = require("./request-context.cjs");
|