fix jsx hidden

This commit is contained in:
Rizky 2023-10-19 10:36:20 +07:00
parent 635436d50c
commit 6463a01ccb
2 changed files with 5 additions and 1 deletions

View File

@ -249,7 +249,7 @@ export const walk = async (
} }
} }
if (!val.skip && !item.hidden) { if (!val.skip) {
if (p.treeMeta[meta.item.id]) { if (p.treeMeta[meta.item.id]) {
for (const [k, v] of Object.entries(meta)) { for (const [k, v] of Object.entries(meta)) {
(p.treeMeta[meta.item.id] as any)[k] = v; (p.treeMeta[meta.item.id] as any)[k] = v;

View File

@ -93,6 +93,10 @@ export const createServer = async () => {
const file = Bun.file(dir.path(`${webPath}${url.pathname}`)); const file = Bun.file(dir.path(`${webPath}${url.pathname}`));
if ((await file.exists()) && file.type !== "application/octet-stream") { if ((await file.exists()) && file.type !== "application/octet-stream") {
if (g.mode === "dev") {
return new Response(file as any);
}
if (!cache.static[url.pathname]) { if (!cache.static[url.pathname]) {
cache.static[url.pathname] = { cache.static[url.pathname] = {
type: lookup(url.pathname) || "text/plain", type: lookup(url.pathname) || "text/plain",