Compare commits

...

2 Commits

Author SHA1 Message Date
add241a405 4 2026-02-18 18:48:58 -08:00
4ff0727006 use proper cwd 2026-02-18 18:48:52 -08:00
2 changed files with 3 additions and 3 deletions

View File

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

View File

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