Compare commits

..

No commits in common. "add241a40578b98eb5141ebcf893f7705fa515fc" and "f6da338b46fd13f5bc78e2f9caa32d29c8e534b9" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@because/hype", "name": "@because/hype",
"version": "0.0.4", "version": "0.0.3",
"module": "src/index.tsx", "module": "src/index.tsx",
"type": "module", "type": "module",
"exports": { "exports": {

View File

@ -198,13 +198,13 @@ export class Hype<
const pageName = (c.req.param('page') ?? 'index').replace('.', '') const pageName = (c.req.param('page') ?? 'index').replace('.', '')
if (pageName.startsWith('_')) return render404(c) if (pageName.startsWith('_')) return render404(c)
const path = join(process.cwd(), `./src/pages/${pageName}.tsx`) const path = join(process.env.PWD ?? '.', `./src/pages/${pageName}.tsx`)
if (!(await Bun.file(path).exists())) if (!(await Bun.file(path).exists()))
return render404(c) return render404(c)
let Layout = defaultLayout let Layout = defaultLayout
const layoutPath = join(process.cwd(), `./src/pages/_layout.tsx`) const layoutPath = join(process.env.PWD ?? '.', `./src/pages/_layout.tsx`)
if (await Bun.file(layoutPath).exists()) { if (await Bun.file(layoutPath).exists()) {
Layout = pageCache.get(layoutPath) Layout = pageCache.get(layoutPath)
if (!Layout) { if (!Layout) {