Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssg fails if _error.tsx exists #236

Open
sho-hata opened this issue Nov 8, 2024 · 1 comment
Open

ssg fails if _error.tsx exists #236

sho-hata opened this issue Nov 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sho-hata
Copy link

sho-hata commented Nov 8, 2024

What version of HonoX are you using?

0.1.26

What steps can reproduce the bug?

  1. npm create hono@latest
  2. choose template: x-basic
  3. Change vite.config.ts as in https://github.com/honojs/honox?tab=readme-ov-file#ssg---static-site-generation
  4. bun run build

What is the expected behavior?

index.html is output to dist/.

dist
├── .vite
├── articles
├── static
├── _routes.json
├── _worker.js
├── favicon.ico
└── index.html

What do you see instead?

index.html is not output to dist/. No error message will be displayed.

dist
├── .vite
├── articles
├── static
├── _routes.json
├── _worker.js
└── favicon.ico

Additional information

  • If you delete error.tsx, ssg build is successfully performed and index.html is generated
  • The _error.tsx file generated by the honox template is treated as a special file in hono because it's used for creating custom error handlers.
    const errorHandler = getErrorHandler(dir, errorMap)

    I suspect that this might be affecting the SSG build process.
@sho-hata sho-hata added the bug Something isn't working label Nov 8, 2024
@sho-hata
Copy link
Author

sho-hata commented Nov 8, 2024

Maybe it has something to do with this issue: #234

@sho-hata sho-hata changed the title ssg fails if _error.tsx exists ssg fails if _error.tsx exists Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant