@edgeone/nuxt-pages 1.1.0-beta.0 → 1.1.0-beta.2
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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
createNuxtApiRoutesMeta,
|
|
9
9
|
createNuxtPagesRouteMeta,
|
|
10
10
|
createNuxtRoutesMeta
|
|
11
|
-
} from "../esm-chunks/chunk-
|
|
11
|
+
} from "../esm-chunks/chunk-UFRAZNP3.js";
|
|
12
12
|
import "../esm-chunks/chunk-5JK44IEA.js";
|
|
13
13
|
import "../esm-chunks/chunk-6BT4RYQJ.js";
|
|
14
14
|
export {
|
|
@@ -140,6 +140,7 @@ async function buildHeadersRoutes(ctx) {
|
|
|
140
140
|
}
|
|
141
141
|
async function buildStage1Routes(ctx) {
|
|
142
142
|
const routes = [];
|
|
143
|
+
routes.push({ src: "^/([^.]+[^/.])$", dest: "/$1/", continue: true });
|
|
143
144
|
routes.push(...await buildHeadersRoutes(ctx));
|
|
144
145
|
routes.push({ handle: "filesystem" });
|
|
145
146
|
return routes;
|
|
@@ -239,26 +240,11 @@ async function buildExplicitSsrAndSwrRoutes(ctx) {
|
|
|
239
240
|
tmp.sort((a, b) => b.score - a.score);
|
|
240
241
|
return tmp.map((x) => x.rule);
|
|
241
242
|
}
|
|
242
|
-
async function buildPrerenderedRoutes(ctx) {
|
|
243
|
-
const routesManifest = await ctx.getRoutesManifest();
|
|
244
|
-
const prerendered = Array.isArray(routesManifest?.prerendered) ? routesManifest.prerendered : [];
|
|
245
|
-
const out = [];
|
|
246
|
-
const seen = /* @__PURE__ */ new Set();
|
|
247
|
-
for (const p of prerendered) {
|
|
248
|
-
if (typeof p !== "string" || !p) continue;
|
|
249
|
-
const normalized = normalizeRoutePath(p);
|
|
250
|
-
if (seen.has(normalized)) continue;
|
|
251
|
-
seen.add(normalized);
|
|
252
|
-
const dest = normalized === "/" ? "/index.html" : `${normalized}/index.html`;
|
|
253
|
-
out.push({ src: normalized, dest });
|
|
254
|
-
}
|
|
255
|
-
return out;
|
|
256
|
-
}
|
|
257
243
|
var createNuxtRoutesMeta = async (ctx) => {
|
|
258
244
|
const routes = await buildStage1Routes(ctx);
|
|
259
|
-
routes.push(...await buildPrerenderedRoutes(ctx));
|
|
260
245
|
routes.push(...await buildExplicitApiRoutes(ctx));
|
|
261
246
|
routes.push(...await buildExplicitSsrAndSwrRoutes(ctx));
|
|
247
|
+
routes.push({ src: "^/(.*)$" });
|
|
262
248
|
writeConfig({ version: CONFIG_VERSION, routes });
|
|
263
249
|
};
|
|
264
250
|
var createNuxtPagesRouteMeta = async (ctx) => {
|
package/dist/index.js
CHANGED