@withl5e/l5e 0.3.2 → 0.3.3-alpha.1
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/entry-server.js +118 -116
- package/dist/entry-server.js.map +1 -1
- package/dist/{generateMetadata-DmoLxT6v.js → generateMetadata-Cn8BIxq6.js} +4 -4
- package/dist/{generateMetadata-DmoLxT6v.js.map → generateMetadata-Cn8BIxq6.js.map} +1 -1
- package/dist/global-style-DFvaBcuR.js +27 -0
- package/dist/global-style-DFvaBcuR.js.map +1 -0
- package/dist/index.js +40 -37
- package/dist/island/runtime.js +40 -23
- package/dist/island/runtime.js.map +1 -1
- package/dist/island.js +34 -28
- package/dist/island.js.map +1 -1
- package/dist/{jsx-runtime-5m2ZiNtU.js → jsx-runtime-DqAp8xlt.js} +93 -77
- package/dist/jsx-runtime-DqAp8xlt.js.map +1 -0
- package/dist/jsx-runtime.js +20 -17
- package/dist/{render-BaTAJ4Ha.js → render-CRag-5V7.js} +2 -2
- package/dist/{render-BaTAJ4Ha.js.map → render-CRag-5V7.js.map} +1 -1
- package/dist/seo.js +3 -3
- package/dist/server.js +299 -280
- package/dist/server.js.map +1 -1
- package/dist/vite-plugin.js +130 -123
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +1 -1
- package/src/core/entry-server.ts +24 -2
- package/src/core/global-style.ts +35 -0
- package/src/core/jsx-runtime.ts +45 -2
- package/src/core/server.ts +57 -12
- package/src/core/vite-plugin.ts +37 -2
- package/src/island/ClientIsland.ts +24 -1
- package/src/island/runtime.ts +27 -1
- package/dist/jsx-runtime-5m2ZiNtU.js.map +0 -1
package/dist/vite-plugin.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { transform as
|
|
2
|
-
import { existsSync as w, mkdirSync as
|
|
1
|
+
import { transform as J } from "esbuild";
|
|
2
|
+
import { existsSync as w, mkdirSync as D, writeFileSync as N, rmSync as G, statSync as O, readFileSync as T, readdirSync as H } from "fs";
|
|
3
3
|
import { join as b, relative as S, resolve as y, dirname as K } from "path";
|
|
4
|
-
|
|
4
|
+
import { f as B } from "./global-style-DFvaBcuR.js";
|
|
5
|
+
const j = "virtual:l5e-views", v = "virtual:l5e-route", _ = "virtual:l5e-ssr-entry", E = "virtual:l5e-global-loader", R = "virtual:l5e-island-strategies", I = "virtual:l5e-islands", $ = "virtual:l5e-actions", P = "virtual:l5e-middleware", F = /* @__PURE__ */ new Set(["MODE", "BASE_URL", "PROD", "DEV", "SSR", "LEGACY"]);
|
|
5
6
|
function k(s, o = []) {
|
|
6
|
-
const
|
|
7
|
-
for (const i of
|
|
7
|
+
const a = H(s);
|
|
8
|
+
for (const i of a) {
|
|
8
9
|
const t = b(s, i);
|
|
9
10
|
if (O(t).isDirectory()) {
|
|
10
11
|
if (i === "node_modules" || i === "dist" || i === ".git")
|
|
@@ -16,166 +17,170 @@ function k(s, o = []) {
|
|
|
16
17
|
}
|
|
17
18
|
function A(s) {
|
|
18
19
|
let o = 0;
|
|
19
|
-
for (let
|
|
20
|
-
o = (o << 5) - o + s.charCodeAt(
|
|
20
|
+
for (let a = 0; a < s.length; a++)
|
|
21
|
+
o = (o << 5) - o + s.charCodeAt(a), o = o & o;
|
|
21
22
|
return Math.abs(o).toString(16).slice(0, 4);
|
|
22
23
|
}
|
|
23
24
|
function V(s) {
|
|
24
25
|
const o = s.split("/");
|
|
25
|
-
let
|
|
26
|
-
return
|
|
26
|
+
let a = o[o.length - 1];
|
|
27
|
+
return a = a.replace(/\.(tsx?|jsx?)$/, ""), a;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function q(s) {
|
|
29
30
|
return `${V(s)}_${A(s)}`;
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
const
|
|
32
|
+
function Y(s, o) {
|
|
33
|
+
const a = s.replace(/^\//, ""), i = y(o, a);
|
|
33
34
|
for (const t of [".tsx", ".ts", ".jsx", ".js"])
|
|
34
35
|
if (w(i + t))
|
|
35
|
-
return
|
|
36
|
-
return w(i) ?
|
|
36
|
+
return a + t;
|
|
37
|
+
return w(i) ? a : null;
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
39
|
+
function Z(s, o) {
|
|
40
|
+
const a = T(s, "utf-8"), i = [], t = /<ClientIsland\s[^>]*?from\s*=\s*"([^"]+)"/g, n = /* @__PURE__ */ new Set();
|
|
40
41
|
let c;
|
|
41
|
-
for (; (c = t.exec(
|
|
42
|
-
const
|
|
42
|
+
for (; (c = t.exec(a)) !== null; ) {
|
|
43
|
+
const l = c[1];
|
|
43
44
|
let e;
|
|
44
|
-
if (
|
|
45
|
-
e = "/src/" +
|
|
46
|
-
else if (
|
|
47
|
-
e =
|
|
48
|
-
else if (
|
|
49
|
-
const
|
|
50
|
-
e = "/" + S(o,
|
|
45
|
+
if (l.startsWith("~/"))
|
|
46
|
+
e = "/src/" + l.substring(2);
|
|
47
|
+
else if (l.startsWith("/src/"))
|
|
48
|
+
e = l;
|
|
49
|
+
else if (l.startsWith("./") || l.startsWith("../")) {
|
|
50
|
+
const m = y(s, "..", l);
|
|
51
|
+
e = "/" + S(o, m).replace(/\\/g, "/");
|
|
51
52
|
} else
|
|
52
|
-
e =
|
|
53
|
-
const d =
|
|
53
|
+
e = l;
|
|
54
|
+
const d = Y(e, o);
|
|
54
55
|
if (!d) {
|
|
55
56
|
console.warn(
|
|
56
|
-
`[l5e] Island component not found: ${e} (from ${
|
|
57
|
+
`[l5e] Island component not found: ${e} (from ${l} in ${s})`
|
|
57
58
|
);
|
|
58
59
|
continue;
|
|
59
60
|
}
|
|
60
|
-
const
|
|
61
|
-
n.has(
|
|
61
|
+
const u = q(e);
|
|
62
|
+
n.has(u) || (n.add(u), i.push({
|
|
62
63
|
component: V(e),
|
|
63
64
|
resolvedPath: e,
|
|
64
65
|
src: d,
|
|
65
66
|
// "src/views/.../Counter.tsx" — matches manifest key format
|
|
66
|
-
key:
|
|
67
|
+
key: u
|
|
67
68
|
}));
|
|
68
69
|
}
|
|
69
70
|
return i;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
const
|
|
73
|
-
let
|
|
74
|
-
for (; (
|
|
75
|
-
const e =
|
|
72
|
+
function X(s, o) {
|
|
73
|
+
const a = T(s, "utf-8"), i = [], t = [], n = /useCss\s*\(\s*['"]([^'"]+)['"]\s*,?\s*\)/g, c = /useClientJs\s*\(\s*['"]([^'"]+)['"]\s*,?\s*\)/g;
|
|
74
|
+
let l;
|
|
75
|
+
for (; (l = n.exec(a)) !== null; ) {
|
|
76
|
+
const e = l[1];
|
|
76
77
|
if (e.startsWith("/src/"))
|
|
77
78
|
i.push(e);
|
|
78
79
|
else if (e.startsWith("./") || e.startsWith("../")) {
|
|
79
|
-
const d = y(s, "..", e),
|
|
80
|
-
i.push(
|
|
80
|
+
const d = y(s, "..", e), u = "/" + S(o, d).replace(/\\/g, "/");
|
|
81
|
+
i.push(u);
|
|
81
82
|
} else
|
|
82
83
|
i.push(e);
|
|
83
84
|
}
|
|
84
|
-
for (; (
|
|
85
|
-
const e =
|
|
85
|
+
for (; (l = c.exec(a)) !== null; ) {
|
|
86
|
+
const e = l[1];
|
|
86
87
|
if (e.startsWith("/src/"))
|
|
87
88
|
t.push(e);
|
|
88
89
|
else if (e.startsWith("./") || e.startsWith("../")) {
|
|
89
|
-
const d = y(s, "..", e),
|
|
90
|
-
t.push(
|
|
90
|
+
const d = y(s, "..", e), u = "/" + S(o, d).replace(/\\/g, "/");
|
|
91
|
+
t.push(u);
|
|
91
92
|
} else
|
|
92
93
|
t.push(e);
|
|
93
94
|
}
|
|
94
95
|
return { css: i, js: t };
|
|
95
96
|
}
|
|
96
97
|
function C(s) {
|
|
97
|
-
const o = {},
|
|
98
|
+
const o = {}, a = b(s, "src"), i = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
98
99
|
try {
|
|
99
|
-
if (!O(
|
|
100
|
+
if (!O(a).isDirectory())
|
|
100
101
|
return { input: o, islandRegistry: i, pathToKey: t, keyToSrc: n, actionRegistry: c };
|
|
101
|
-
const
|
|
102
|
-
w(
|
|
103
|
-
const e =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
|
|
102
|
+
const l = b(s, "src", "client.global.ts");
|
|
103
|
+
w(l) && (o.global = l, console.log("[l5e] Detected src/client.global.ts and added as entry"));
|
|
104
|
+
const e = B(s);
|
|
105
|
+
e && (o["global-style"] = e, console.log("[l5e] Detected src/global.css and added as global stylesheet"));
|
|
106
|
+
const d = k(a), u = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set();
|
|
107
|
+
for (const r of d) {
|
|
108
|
+
const { css: f, js: p } = X(r, s);
|
|
109
|
+
f.forEach((h) => u.add(h)), p.forEach((h) => m.add(h));
|
|
110
|
+
const g = Z(r, s);
|
|
111
|
+
for (const h of g)
|
|
109
112
|
i.set(h.key, h.resolvedPath), t.set(h.resolvedPath, h.key), n.set(h.key, h.src);
|
|
110
|
-
const
|
|
111
|
-
if (/\/actions\.(ts|tsx)$/.test(
|
|
112
|
-
const h = T(r, "utf-8"),
|
|
113
|
+
const x = r.replace(/\\/g, "/");
|
|
114
|
+
if (/\/actions\.(ts|tsx)$/.test(x)) {
|
|
115
|
+
const h = T(r, "utf-8"), U = /export\s+const\s+(\w+)\s*=\s*defineAction\s*\(/g;
|
|
113
116
|
let W;
|
|
114
|
-
const L = S(
|
|
115
|
-
for (; (W =
|
|
116
|
-
const M = W[1],
|
|
117
|
-
c.set(
|
|
117
|
+
const L = S(a, K(r)).replace(/\\/g, "/") || ".";
|
|
118
|
+
for (; (W = U.exec(h)) !== null; ) {
|
|
119
|
+
const M = W[1], z = `${M}_${A(L)}`;
|
|
120
|
+
c.set(z, { modulePath: L, actionName: M });
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
123
|
}
|
|
121
|
-
for (const r of
|
|
122
|
-
const
|
|
124
|
+
for (const r of u) {
|
|
125
|
+
const f = r.startsWith("/src/") || r.startsWith("/") ? r.substring(1) : r, p = y(s, f);
|
|
126
|
+
if (e && y(p) === y(e))
|
|
127
|
+
continue;
|
|
123
128
|
if (!w(p)) {
|
|
124
129
|
console.warn(`[l5e] CSS file not found: ${p} (from ${r})`);
|
|
125
130
|
continue;
|
|
126
131
|
}
|
|
127
|
-
const
|
|
128
|
-
o[
|
|
132
|
+
const g = f.replace(/^src\//, "").replace(/\.css$/, "").replace(/\//g, "-").replace(/\\/g, "-");
|
|
133
|
+
o[g] = p;
|
|
129
134
|
}
|
|
130
|
-
for (const r of
|
|
131
|
-
const
|
|
135
|
+
for (const r of m) {
|
|
136
|
+
const f = r.startsWith("/src/") || r.startsWith("/") ? r.substring(1) : r, p = y(s, f);
|
|
132
137
|
if (!w(p)) {
|
|
133
138
|
console.warn(`[l5e] JS/TS file not found: ${p} (from ${r})`);
|
|
134
139
|
continue;
|
|
135
140
|
}
|
|
136
|
-
const
|
|
137
|
-
o[
|
|
141
|
+
const g = f.replace(/^src\//, "").replace(/\.(ts|tsx|js|jsx)$/, "").replace(/\//g, "-").replace(/\\/g, "-");
|
|
142
|
+
o[g] = p;
|
|
138
143
|
}
|
|
139
|
-
for (const [r,
|
|
140
|
-
const p = y(s,
|
|
144
|
+
for (const [r, f] of n) {
|
|
145
|
+
const p = y(s, f);
|
|
141
146
|
o[`island-${r}`] = p;
|
|
142
147
|
}
|
|
143
148
|
i.size > 0 && console.log(`[l5e] Detected ${i.size} island(s)`), c.size > 0 && console.log(`[l5e] Detected ${c.size} action(s)`);
|
|
144
|
-
} catch (
|
|
145
|
-
console.warn("[l5e] Failed to discover rollup input:",
|
|
149
|
+
} catch (l) {
|
|
150
|
+
console.warn("[l5e] Failed to discover rollup input:", l);
|
|
146
151
|
}
|
|
147
152
|
return { input: o, islandRegistry: i, pathToKey: t, keyToSrc: n, actionRegistry: c };
|
|
148
153
|
}
|
|
149
|
-
function
|
|
154
|
+
function Q(s, o, a, i, t) {
|
|
150
155
|
const n = [];
|
|
151
156
|
let c = 0;
|
|
152
|
-
const
|
|
157
|
+
const l = /ClientIsland\s*,\s*\{/g;
|
|
153
158
|
let e;
|
|
154
|
-
for (; (e =
|
|
155
|
-
const d = e.index + e[0].length,
|
|
156
|
-
if (!r) continue;
|
|
157
|
-
const u = r[1];
|
|
158
|
-
let p;
|
|
159
|
-
if (u.startsWith("~/"))
|
|
160
|
-
p = "/src/" + u.substring(2);
|
|
161
|
-
else if (u.startsWith("/src/"))
|
|
162
|
-
p = u;
|
|
163
|
-
else if (u.startsWith("./") || u.startsWith("../")) {
|
|
164
|
-
const x = y(o, "..", u);
|
|
165
|
-
p = "/" + S(l, x).replace(/\\/g, "/");
|
|
166
|
-
} else
|
|
167
|
-
p = u;
|
|
168
|
-
const m = i.get(p);
|
|
159
|
+
for (; (e = l.exec(s)) !== null; ) {
|
|
160
|
+
const d = e.index + e[0].length, u = s.substring(d, d + 500), m = /from:\s*"([^"]+)"/.exec(u);
|
|
169
161
|
if (!m) continue;
|
|
170
|
-
const
|
|
162
|
+
const r = m[1];
|
|
163
|
+
let f;
|
|
164
|
+
if (r.startsWith("~/"))
|
|
165
|
+
f = "/src/" + r.substring(2);
|
|
166
|
+
else if (r.startsWith("/src/"))
|
|
167
|
+
f = r;
|
|
168
|
+
else if (r.startsWith("./") || r.startsWith("../")) {
|
|
169
|
+
const h = y(o, "..", r);
|
|
170
|
+
f = "/" + S(a, h).replace(/\\/g, "/");
|
|
171
|
+
} else
|
|
172
|
+
f = r;
|
|
173
|
+
const p = i.get(f);
|
|
174
|
+
if (!p) continue;
|
|
175
|
+
const g = t.get(p);
|
|
171
176
|
if (!g) continue;
|
|
172
|
-
const
|
|
173
|
-
n.push(s.substring(c,
|
|
177
|
+
const x = d + m.index + m[0].length;
|
|
178
|
+
n.push(s.substring(c, x)), n.push(`, __key: "${p}", __src: "${g}"`), c = x;
|
|
174
179
|
}
|
|
175
180
|
return n.push(s.substring(c)), n.join("");
|
|
176
181
|
}
|
|
177
|
-
function
|
|
178
|
-
let s = process.cwd(), o = /* @__PURE__ */ new Map(),
|
|
182
|
+
function ot() {
|
|
183
|
+
let s = process.cwd(), o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
179
184
|
return {
|
|
180
185
|
name: "l5e-jsx-classic",
|
|
181
186
|
enforce: "pre",
|
|
@@ -209,7 +214,7 @@ function st() {
|
|
|
209
214
|
const t = b(s, ".l5e-temp");
|
|
210
215
|
if (w(t))
|
|
211
216
|
try {
|
|
212
|
-
|
|
217
|
+
G(t, { recursive: !0, force: !0 }), console.log("[l5e] Cleaned up temporary files");
|
|
213
218
|
} catch (n) {
|
|
214
219
|
console.warn("[l5e] Failed to cleanup temporary files:", n);
|
|
215
220
|
}
|
|
@@ -217,15 +222,15 @@ function st() {
|
|
|
217
222
|
writeBundle(t, n) {
|
|
218
223
|
if (i.size > 0) {
|
|
219
224
|
const c = b(s, "dist", "server");
|
|
220
|
-
w(c) ||
|
|
221
|
-
const
|
|
222
|
-
|
|
225
|
+
w(c) || D(c, { recursive: !0 });
|
|
226
|
+
const l = Object.fromEntries(i);
|
|
227
|
+
N(b(c, "action-registry.json"), JSON.stringify(l), "utf-8"), console.log(`[l5e] Wrote action-registry.json (${i.size} actions)`);
|
|
223
228
|
}
|
|
224
229
|
},
|
|
225
230
|
config(t) {
|
|
226
231
|
const n = t.root || process.cwd(), c = C(n);
|
|
227
|
-
c.islandRegistry, o = c.pathToKey,
|
|
228
|
-
const
|
|
232
|
+
c.islandRegistry, o = c.pathToKey, a = c.keyToSrc, i = c.actionRegistry;
|
|
233
|
+
const l = t.build?.rollupOptions?.input || {}, e = typeof l == "object" && !Array.isArray(l) ? { ...c.input, ...l } : c.input;
|
|
229
234
|
return {
|
|
230
235
|
build: {
|
|
231
236
|
...t.build,
|
|
@@ -241,7 +246,7 @@ function st() {
|
|
|
241
246
|
};
|
|
242
247
|
},
|
|
243
248
|
resolveId(t) {
|
|
244
|
-
return t === j ? "\0" + j : t === v ? "\0" + v : t === _ ? "\0" + _ : t === E ? "\0" + E : t === R ? "\0" + R : t ===
|
|
249
|
+
return t === j ? "\0" + j : t === v ? "\0" + v : t === _ ? "\0" + _ : t === E ? "\0" + E : t === R ? "\0" + R : t === I ? "\0" + I : t === $ ? "\0" + $ : t === P ? "\0" + P : null;
|
|
245
250
|
},
|
|
246
251
|
async transform(t, n, c) {
|
|
247
252
|
if (n.replace(/\\/g, "/").endsWith("src/client.global.ts") && !c?.ssr)
|
|
@@ -253,23 +258,23 @@ ${t}`,
|
|
|
253
258
|
if (!c?.ssr) {
|
|
254
259
|
const d = n.replace(/\\/g, "/").match(/\/src\/(.+)\/actions\.(ts|tsx)$/);
|
|
255
260
|
if (d) {
|
|
256
|
-
const
|
|
257
|
-
let
|
|
258
|
-
for (; (
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
+
const u = d[1], m = /export\s+const\s+(\w+)\s*=\s*defineAction\s*\(/g, r = [];
|
|
262
|
+
let f;
|
|
263
|
+
for (; (f = m.exec(t)) !== null; ) {
|
|
264
|
+
const p = f[1], x = t.substring(f.index, f.index + 500).match(/method:\s*['"](\w+)['"]/), h = x ? x[1].toUpperCase() : "GET";
|
|
265
|
+
r.push({ name: p, method: h });
|
|
261
266
|
}
|
|
262
|
-
if (
|
|
267
|
+
if (r.length > 0)
|
|
263
268
|
return {
|
|
264
|
-
code:
|
|
265
|
-
const
|
|
266
|
-
return
|
|
267
|
-
const res = await fetch('/_l5e/action/${
|
|
269
|
+
code: r.map(({ name: g, method: x }) => {
|
|
270
|
+
const h = `${g}_${A(u)}`;
|
|
271
|
+
return x === "GET" ? `export async function ${g}(params) {
|
|
272
|
+
const res = await fetch('/_l5e/action/${h}?' + new URLSearchParams(params));
|
|
268
273
|
if (!res.ok) throw Object.assign(new Error('HTTP ' + res.status), { status: res.status });
|
|
269
274
|
return res;
|
|
270
275
|
}` : `export async function ${g}(body) {
|
|
271
|
-
const res = await fetch('/_l5e/action/${
|
|
272
|
-
method: '${
|
|
276
|
+
const res = await fetch('/_l5e/action/${h}', {
|
|
277
|
+
method: '${x}',
|
|
273
278
|
headers: { 'Content-Type': 'application/json' },
|
|
274
279
|
body: JSON.stringify(body),
|
|
275
280
|
});
|
|
@@ -288,7 +293,7 @@ ${t}`,
|
|
|
288
293
|
if (/\.(tsx|jsx)$/.test(n))
|
|
289
294
|
try {
|
|
290
295
|
const e = `import { Fragment as __Fragment, jsxFactory } from "@withl5e/l5e/jsx-runtime"
|
|
291
|
-
${t}`, d = await
|
|
296
|
+
${t}`, d = await J(e, {
|
|
292
297
|
loader: n.endsWith(".tsx") ? "tsx" : "jsx",
|
|
293
298
|
jsx: "transform",
|
|
294
299
|
jsxFactory: "jsxFactory",
|
|
@@ -297,9 +302,9 @@ ${t}`, d = await z(e, {
|
|
|
297
302
|
sourcefile: n,
|
|
298
303
|
target: "es2020"
|
|
299
304
|
});
|
|
300
|
-
let
|
|
301
|
-
return
|
|
302
|
-
code:
|
|
305
|
+
let u = d.code;
|
|
306
|
+
return u.includes("ClientIsland") && (u = Q(u, n, s, o, a)), {
|
|
307
|
+
code: u,
|
|
303
308
|
map: d.map || null
|
|
304
309
|
};
|
|
305
310
|
} catch (e) {
|
|
@@ -309,10 +314,10 @@ ${t}`, d = await z(e, {
|
|
|
309
314
|
let e = t, d = !1;
|
|
310
315
|
if (e = e.replace(
|
|
311
316
|
/import\.meta\.env\.([a-zA-Z_][a-zA-Z0-9_]*)/g,
|
|
312
|
-
(
|
|
317
|
+
(u, m) => F.has(m) ? u : (d = !0, `process.env.${m}`)
|
|
313
318
|
), e = e.replace(
|
|
314
319
|
/import\.meta\.env\[(['"`])([^'"`]+)\1\]/g,
|
|
315
|
-
(
|
|
320
|
+
(u, m, r) => F.has(r) ? u : (d = !0, `process.env[${m}${r}${m}]`)
|
|
316
321
|
), d)
|
|
317
322
|
return {
|
|
318
323
|
code: e,
|
|
@@ -329,7 +334,9 @@ export const viewLoaders = import.meta.glob('/src/views/*/loader.{ts,tsx}');
|
|
|
329
334
|
export const viewComponents = import.meta.glob('/src/views/*/index.tsx');
|
|
330
335
|
`;
|
|
331
336
|
if (t === "\0" + v)
|
|
332
|
-
return
|
|
337
|
+
return `export default function routeHandler(requestInfo) {
|
|
338
|
+
return import('/src/route.ts').then((mod) => mod.default(requestInfo));
|
|
339
|
+
}`;
|
|
333
340
|
if (t === "\0" + _)
|
|
334
341
|
return `export { render } from '@withl5e/l5e/entry-server';
|
|
335
342
|
export { viewActions } from 'virtual:l5e-actions';`;
|
|
@@ -340,7 +347,7 @@ export { viewActions } from 'virtual:l5e-actions';`;
|
|
|
340
347
|
return `export const viewActions = import.meta.glob('/src/**/actions.{ts,tsx}');
|
|
341
348
|
export const actionRegistry = ${JSON.stringify(n)};`;
|
|
342
349
|
}
|
|
343
|
-
if (t === "\0" +
|
|
350
|
+
if (t === "\0" + P)
|
|
344
351
|
return `
|
|
345
352
|
const middlewareModules = import.meta.glob([
|
|
346
353
|
'/src/middleware.{ts,tsx,js,jsx}',
|
|
@@ -366,7 +373,7 @@ export async function loadMiddleware() {
|
|
|
366
373
|
return mod.onRequest;
|
|
367
374
|
}
|
|
368
375
|
`;
|
|
369
|
-
if (t === "\0" +
|
|
376
|
+
if (t === "\0" + I)
|
|
370
377
|
return "export const islandModules = import.meta.glob('/src/**/react/*.{tsx,jsx}');";
|
|
371
378
|
if (t === "\0" + R) {
|
|
372
379
|
const n = b(s, "src", "island-strategies.ts");
|
|
@@ -377,7 +384,7 @@ export async function loadMiddleware() {
|
|
|
377
384
|
};
|
|
378
385
|
}
|
|
379
386
|
export {
|
|
380
|
-
|
|
381
|
-
|
|
387
|
+
ot as coreVite,
|
|
388
|
+
ot as default
|
|
382
389
|
};
|
|
383
390
|
//# sourceMappingURL=vite-plugin.js.map
|