@qwik.dev/router 2.0.0-beta.39 → 2.0.0-beta.40
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/lib/adapters/azure-swa/vite/index.mjs +45 -54
- package/lib/adapters/bun-server/vite/index.mjs +16 -22
- package/lib/adapters/cloud-run/vite/index.mjs +15 -19
- package/lib/adapters/cloudflare-pages/vite/index.mjs +46 -67
- package/lib/adapters/deno-server/vite/index.mjs +25 -39
- package/lib/adapters/netlify-edge/vite/index.mjs +50 -76
- package/lib/adapters/node-server/vite/index.mjs +16 -22
- package/lib/adapters/shared/vite/index.mjs +271 -360
- package/lib/adapters/ssg/vite/index.mjs +11 -15
- package/lib/adapters/vercel-edge/vite/index.mjs +74 -95
- package/lib/chunks/dev-preloaded-route-loader.mjs +2 -3
- package/lib/chunks/format.mjs +16 -23
- package/lib/chunks/fs.mjs +93 -106
- package/lib/chunks/head.qwik.mjs +1174 -1382
- package/lib/chunks/http-error.qwik.mjs +20 -28
- package/lib/chunks/pathname.mjs +50 -69
- package/lib/chunks/request-body-limit.mjs +25 -35
- package/lib/chunks/request-path.mjs +44 -55
- package/lib/chunks/routes.mjs +20 -41
- package/lib/chunks/server-error.mjs +15 -18
- package/lib/chunks/system.mjs +258 -326
- package/lib/chunks/url.mjs +56 -58
- package/lib/chunks/user-response.mjs +1616 -1804
- package/lib/chunks/worker-thread.mjs +254 -307
- package/lib/index.qwik.mjs +1637 -1918
- package/lib/middleware/aws-lambda/index.mjs +44 -52
- package/lib/middleware/azure-swa/index.mjs +85 -94
- package/lib/middleware/bun/index.mjs +118 -138
- package/lib/middleware/cloudflare-pages/index.mjs +83 -96
- package/lib/middleware/deno/index.mjs +104 -125
- package/lib/middleware/firebase/index.mjs +21 -25
- package/lib/middleware/netlify-edge/index.mjs +63 -71
- package/lib/middleware/node/index.mjs +297 -357
- package/lib/middleware/request-handler/index.mjs +110 -133
- package/lib/middleware/vercel-edge/index.mjs +82 -98
- package/lib/service-worker/index.mjs +12 -3
- package/lib/ssg/index.mjs +249 -289
- package/lib/vite/index.mjs +2344 -3030
- package/package.json +5 -5
- package/lib/chunks/use-functions.qwik.mjs +0 -23
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { viteAdapter } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...opts
|
|
12
|
-
}
|
|
13
|
-
});
|
|
1
|
+
import { viteAdapter } from "../../shared/vite/index.mjs";
|
|
2
|
+
/** @public */ function ssgAdapter(opts) {
|
|
3
|
+
return viteAdapter({
|
|
4
|
+
name: "static-site-generation",
|
|
5
|
+
origin: opts.origin,
|
|
6
|
+
ssg: {
|
|
7
|
+
include: ["/*"],
|
|
8
|
+
...opts
|
|
9
|
+
}
|
|
10
|
+
});
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/** @public @deprecated Use `ssgAdapter` instead. */ var staticAdapter = ssgAdapter;
|
|
17
13
|
export { ssgAdapter, staticAdapter };
|
|
@@ -1,97 +1,76 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
runtime: "edge",
|
|
76
|
-
entrypoint,
|
|
77
|
-
envVarsInUse: opts.vcConfigEnvVarsInUse
|
|
78
|
-
};
|
|
79
|
-
await fs.promises.writeFile(vcConfigPath, JSON.stringify(vcConfig, null, 2));
|
|
80
|
-
let vercelStaticDir = join(vercelOutputDir, "static");
|
|
81
|
-
const basePathnameParts = basePathname.split("/").filter((p) => p.length > 0);
|
|
82
|
-
if (basePathnameParts.length > 0) {
|
|
83
|
-
vercelStaticDir = join(vercelStaticDir, ...basePathnameParts);
|
|
84
|
-
}
|
|
85
|
-
await fs.promises.rm(vercelStaticDir, {
|
|
86
|
-
recursive: true,
|
|
87
|
-
force: true
|
|
88
|
-
});
|
|
89
|
-
await fs.promises.mkdir(dirname(vercelStaticDir), {
|
|
90
|
-
recursive: true
|
|
91
|
-
});
|
|
92
|
-
await fs.promises.rename(clientPublicOutDir, vercelStaticDir);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
1
|
+
import { getParentDir, viteAdapter } from "../../shared/vite/index.mjs";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
/** @public */ function vercelEdgeAdapter(opts = {}) {
|
|
5
|
+
return viteAdapter({
|
|
6
|
+
name: "vercel-edge",
|
|
7
|
+
origin: process?.env?.VERCEL_URL || "https://yoursitename.vercel.app",
|
|
8
|
+
ssg: opts.ssg,
|
|
9
|
+
staticPaths: opts.staticPaths,
|
|
10
|
+
cleanStaticGenerated: true,
|
|
11
|
+
config(config) {
|
|
12
|
+
const outDir = config.build?.outDir || join(".vercel", "output", "functions", "_qwik-router.func");
|
|
13
|
+
return {
|
|
14
|
+
resolve: { conditions: opts.target === "node" ? [
|
|
15
|
+
"node",
|
|
16
|
+
"import",
|
|
17
|
+
"module",
|
|
18
|
+
"browser",
|
|
19
|
+
"default"
|
|
20
|
+
] : [
|
|
21
|
+
"edge-light",
|
|
22
|
+
"webworker",
|
|
23
|
+
"worker",
|
|
24
|
+
"browser",
|
|
25
|
+
"module",
|
|
26
|
+
"main"
|
|
27
|
+
] },
|
|
28
|
+
ssr: {
|
|
29
|
+
target: opts.target === "node" ? "node" : "webworker",
|
|
30
|
+
noExternal: true
|
|
31
|
+
},
|
|
32
|
+
build: {
|
|
33
|
+
ssr: true,
|
|
34
|
+
outDir,
|
|
35
|
+
rolldownOptions: { output: { format: "es" } }
|
|
36
|
+
},
|
|
37
|
+
publicDir: false
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
async generate({ clientPublicOutDir, serverOutDir, basePathname, outputEntries }) {
|
|
41
|
+
const vercelOutputDir = getParentDir(serverOutDir, "output");
|
|
42
|
+
if (opts.outputConfig !== false) {
|
|
43
|
+
const vercelOutputConfig = {
|
|
44
|
+
routes: [{ handle: "filesystem" }, {
|
|
45
|
+
src: basePathname + ".*",
|
|
46
|
+
dest: "/_qwik-router"
|
|
47
|
+
}],
|
|
48
|
+
version: 3
|
|
49
|
+
};
|
|
50
|
+
await fs.promises.writeFile(join(vercelOutputDir, "config.json"), JSON.stringify(vercelOutputConfig, null, 2));
|
|
51
|
+
}
|
|
52
|
+
let entrypoint = opts.vcConfigEntryPoint;
|
|
53
|
+
if (!entrypoint) {
|
|
54
|
+
if (outputEntries.some((n) => n === "entry.vercel-edge.mjs")) entrypoint = "entry.vercel-edge.mjs";
|
|
55
|
+
else entrypoint = "entry.vercel-edge.js";
|
|
56
|
+
}
|
|
57
|
+
const vcConfigPath = join(serverOutDir, ".vc-config.json");
|
|
58
|
+
const vcConfig = {
|
|
59
|
+
runtime: "edge",
|
|
60
|
+
entrypoint,
|
|
61
|
+
envVarsInUse: opts.vcConfigEnvVarsInUse
|
|
62
|
+
};
|
|
63
|
+
await fs.promises.writeFile(vcConfigPath, JSON.stringify(vcConfig, null, 2));
|
|
64
|
+
let vercelStaticDir = join(vercelOutputDir, "static");
|
|
65
|
+
const basePathnameParts = basePathname.split("/").filter((p) => p.length > 0);
|
|
66
|
+
if (basePathnameParts.length > 0) vercelStaticDir = join(vercelStaticDir, ...basePathnameParts);
|
|
67
|
+
await fs.promises.rm(vercelStaticDir, {
|
|
68
|
+
recursive: true,
|
|
69
|
+
force: true
|
|
70
|
+
});
|
|
71
|
+
await fs.promises.mkdir(dirname(vercelStaticDir), { recursive: true });
|
|
72
|
+
await fs.promises.rename(clientPublicOutDir, vercelStaticDir);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
95
75
|
}
|
|
96
|
-
|
|
97
76
|
export { vercelEdgeAdapter };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { devPreloadedRouteLoaders as d };
|
|
1
|
+
var devPreloadedRouteLoaders = globalThis[Symbol.for("devPreloadedRouteLoaders")] ??= /* @__PURE__ */ new WeakMap();
|
|
2
|
+
export { devPreloadedRouteLoaders as t };
|
package/lib/chunks/format.mjs
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
function toTitleCase(str) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
return str.replace(/\w\S*/g, (txt) => {
|
|
3
|
+
return txt.charAt(0).toUpperCase() + txt.slice(1).toLowerCase();
|
|
4
|
+
});
|
|
5
5
|
}
|
|
6
6
|
function addError(ctx, e) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
ctx.diagnostics.push({
|
|
8
|
+
type: "error",
|
|
9
|
+
message: e ? String(e.stack || e) : "Error"
|
|
10
|
+
});
|
|
11
11
|
}
|
|
12
12
|
function addWarning(ctx, message) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
ctx.diagnostics.push({
|
|
14
|
+
type: "warn",
|
|
15
|
+
message: String(message)
|
|
16
|
+
});
|
|
17
17
|
}
|
|
18
18
|
function msToString(ms) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return ms.toFixed(1) + " ms";
|
|
24
|
-
}
|
|
25
|
-
if (ms < 6e4) {
|
|
26
|
-
return (ms / 1e3).toFixed(1) + " s";
|
|
27
|
-
}
|
|
28
|
-
return (ms / 6e4).toFixed(1) + " m";
|
|
19
|
+
if (ms < 1) return ms.toFixed(2) + " ms";
|
|
20
|
+
if (ms < 1e3) return ms.toFixed(1) + " ms";
|
|
21
|
+
if (ms < 6e4) return (ms / 1e3).toFixed(1) + " s";
|
|
22
|
+
return (ms / 6e4).toFixed(1) + " m";
|
|
29
23
|
}
|
|
30
|
-
|
|
31
|
-
export { addError as a, addWarning as b, msToString as m, toTitleCase as t };
|
|
24
|
+
export { toTitleCase as i, addWarning as n, msToString as r, addError as t };
|
package/lib/chunks/fs.mjs
CHANGED
|
@@ -1,146 +1,133 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { i as normalizePathname, t as ensureSlash } from "./pathname.mjs";
|
|
2
|
+
import { i as toTitleCase } from "./format.mjs";
|
|
3
|
+
import { basename, dirname, normalize, relative } from "node:path";
|
|
5
4
|
function parseRouteIndexName(extlessName) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
layoutStop
|
|
19
|
-
};
|
|
5
|
+
let layoutName = "";
|
|
6
|
+
const layoutStop = extlessName.endsWith("!");
|
|
7
|
+
if (layoutStop) extlessName = extlessName.slice(0, extlessName.length - 1);
|
|
8
|
+
const namedLayoutParts = extlessName.split("@");
|
|
9
|
+
if (namedLayoutParts.length > 1) {
|
|
10
|
+
namedLayoutParts.shift();
|
|
11
|
+
layoutName = namedLayoutParts.join("@");
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
layoutName,
|
|
15
|
+
layoutStop
|
|
16
|
+
};
|
|
20
17
|
}
|
|
21
18
|
function getExtension(fileName) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
return "";
|
|
19
|
+
if (typeof fileName === "string") {
|
|
20
|
+
const parts = fileName.trim().toLowerCase().split(".");
|
|
21
|
+
if (parts.length > 1) {
|
|
22
|
+
const ext = parts.pop().split("?")[0].split("#")[0];
|
|
23
|
+
if (ext === "ts" && parts.pop() === "d") return ".d.ts";
|
|
24
|
+
return "." + ext;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return "";
|
|
33
28
|
}
|
|
34
29
|
function removeExtension(fileName) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
if (typeof fileName === "string") {
|
|
31
|
+
fileName = fileName.trim();
|
|
32
|
+
const ext = getExtension(fileName);
|
|
33
|
+
return fileName.slice(0, fileName.length - ext.length);
|
|
34
|
+
}
|
|
35
|
+
return "";
|
|
41
36
|
}
|
|
42
37
|
function normalizePathSlash(path) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (path.endsWith("/")) {
|
|
50
|
-
path = path.slice(0, path.length - 1);
|
|
51
|
-
}
|
|
52
|
-
return path;
|
|
38
|
+
const isExtendedLengthPath = path.startsWith("\\\\?\\");
|
|
39
|
+
const hasNonAscii = /[^\u0000-\u0080]+/.test(path);
|
|
40
|
+
if (isExtendedLengthPath || hasNonAscii) return path;
|
|
41
|
+
path = path.replace(/\\/g, "/");
|
|
42
|
+
if (path.endsWith("/")) path = path.slice(0, path.length - 1);
|
|
43
|
+
return path;
|
|
53
44
|
}
|
|
54
45
|
function normalizePath(path) {
|
|
55
|
-
|
|
46
|
+
return normalizePathSlash(normalize(path));
|
|
56
47
|
}
|
|
57
48
|
function getMenuPathname(opts, filePath) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
49
|
+
let pathname = normalizePath(relative(opts.routesDir, filePath));
|
|
50
|
+
pathname = `/` + normalizePath(dirname(pathname));
|
|
51
|
+
const result = normalizePathname(pathname, opts.basePathname);
|
|
52
|
+
return ensureSlash(result);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Creates an id for the module, based on its path.
|
|
56
|
+
*
|
|
57
|
+
* @param routesDir
|
|
58
|
+
* @param fsPath
|
|
59
|
+
* @param explicitFileType Add to avoid collisions between different types of modules. `Menu` and
|
|
60
|
+
* `Layout` files are named based on their path (eg. /routes/about/menu.md => AboutMenu)
|
|
61
|
+
*/ function createFileId(routesDir, fsPath, explicitFileType) {
|
|
62
|
+
const ids = [];
|
|
63
|
+
for (let i = 0; i < 25; i++) {
|
|
64
|
+
let baseName = removeExtension(basename(fsPath));
|
|
65
|
+
baseName = baseName.replace(/[\W_]+/g, "");
|
|
66
|
+
if (baseName === "") baseName = "Q" + i;
|
|
67
|
+
else if (!isNaN(baseName.charAt(0))) baseName = "Q" + baseName;
|
|
68
|
+
ids.push(toTitleCase(baseName));
|
|
69
|
+
fsPath = normalizePath(dirname(fsPath));
|
|
70
|
+
if (fsPath === routesDir) break;
|
|
71
|
+
}
|
|
72
|
+
if (ids.length > 1 && ids[0] === "Index") ids.shift();
|
|
73
|
+
return ids.reverse().join("").concat(explicitFileType || "");
|
|
74
|
+
}
|
|
75
|
+
var PAGE_MODULE_EXTS = {
|
|
76
|
+
".tsx": true,
|
|
77
|
+
".jsx": true
|
|
87
78
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
var MODULE_EXTS = {
|
|
80
|
+
".ts": true,
|
|
81
|
+
".js": true
|
|
91
82
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
var MARKDOWN_EXTS = {
|
|
84
|
+
".md": true,
|
|
85
|
+
".mdx": true
|
|
95
86
|
};
|
|
96
87
|
function isIndexModule(extlessName) {
|
|
97
|
-
|
|
88
|
+
return /^index(|!|@.+)$/.test(extlessName);
|
|
98
89
|
}
|
|
99
90
|
function isPluginModule(extlessName) {
|
|
100
|
-
|
|
91
|
+
return /^plugin(|@.+)$/.test(extlessName) && !/\.(test|unit|spec)(\.[jt]s)?$/.test(extlessName);
|
|
101
92
|
}
|
|
102
93
|
function isLayoutModule(extlessName) {
|
|
103
|
-
|
|
94
|
+
return /^layout(|!|-.+)$/.test(extlessName);
|
|
104
95
|
}
|
|
105
96
|
function isPageModuleExt(ext) {
|
|
106
|
-
|
|
97
|
+
return ext in PAGE_MODULE_EXTS;
|
|
107
98
|
}
|
|
108
99
|
function isModuleExt(ext) {
|
|
109
|
-
|
|
100
|
+
return ext in MODULE_EXTS;
|
|
110
101
|
}
|
|
111
102
|
function isMarkdownExt(ext) {
|
|
112
|
-
|
|
103
|
+
return ext in MARKDOWN_EXTS;
|
|
113
104
|
}
|
|
114
105
|
function isPageExt(ext) {
|
|
115
|
-
|
|
106
|
+
return ext in PAGE_MODULE_EXTS || ext in MARKDOWN_EXTS;
|
|
116
107
|
}
|
|
117
108
|
function isMenuFileName(fileName) {
|
|
118
|
-
|
|
109
|
+
return fileName === "menu.md";
|
|
119
110
|
}
|
|
120
111
|
function isServiceWorkerName(extlessName) {
|
|
121
|
-
|
|
112
|
+
return extlessName === "service-worker";
|
|
122
113
|
}
|
|
123
114
|
function isEntryName(extlessName) {
|
|
124
|
-
|
|
115
|
+
return extlessName === "entry";
|
|
125
116
|
}
|
|
126
|
-
function errorBoundaryName(extlessName) {
|
|
127
|
-
|
|
128
|
-
|
|
117
|
+
/** The boundary kind, ignoring any `@x`/`!` modifier: `'404'`, `'error'`, or undefined. */ function errorBoundaryName(extlessName) {
|
|
118
|
+
const match = /^(error|404)(?:|!|@.+)$/.exec(extlessName);
|
|
119
|
+
return match ? match[1] : void 0;
|
|
129
120
|
}
|
|
130
121
|
function isErrorName(extlessName) {
|
|
131
|
-
|
|
122
|
+
return errorBoundaryName(extlessName) !== void 0;
|
|
132
123
|
}
|
|
133
124
|
function isGroupedLayoutName(dirName, warn = true) {
|
|
134
|
-
|
|
125
|
+
return dirName.startsWith("(") && dirName.endsWith(")");
|
|
135
126
|
}
|
|
136
127
|
function getPathnameFromDirPath(opts, dirPath) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return pathname;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export { isErrorName as a, isPageModuleExt as b, isModuleExt as c, isMarkdownExt as d, isLayoutModule as e, isEntryName as f, getExtension as g, isMenuFileName as h, isIndexModule as i, isServiceWorkerName as j, normalizePath as k, getPathnameFromDirPath as l, getMenuPathname as m, normalizePathSlash as n, createFileId as o, parseRouteIndexName as p, errorBoundaryName as q, removeExtension as r, isPluginModule as s, isPageExt as t };
|
|
128
|
+
let pathname = normalizePath(relative(opts.routesDir, dirPath));
|
|
129
|
+
pathname = normalizePathname(pathname, opts.basePathname).split("/").filter((segment) => !isGroupedLayoutName(segment)).join("/");
|
|
130
|
+
if (pathname === "") return "/";
|
|
131
|
+
return pathname;
|
|
132
|
+
}
|
|
133
|
+
export { normalizePath as _, getPathnameFromDirPath as a, removeExtension as b, isIndexModule as c, isMenuFileName as d, isModuleExt as f, isServiceWorkerName as g, isPluginModule as h, getMenuPathname as i, isLayoutModule as l, isPageModuleExt as m, errorBoundaryName as n, isEntryName as o, isPageExt as p, getExtension as r, isErrorName as s, createFileId as t, isMarkdownExt as u, normalizePathSlash as v, parseRouteIndexName as y };
|