Compare commits
2 Commits
f6da338b46
...
add241a405
| Author | SHA1 | Date | |
|---|---|---|---|
| add241a405 | |||
| 4ff0727006 |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@because/hype",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"module": "src/index.tsx",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user