Last 12 weeks Β· 9 commits
3 of 6 standards met
What is the feature you are proposing? I'm attempting to use honox paired with the @hono/vite-build/vercel package to ship the example honox project to vercel with client interactions. Following along with the examples, I've tried to adapt this approach to vercel but cannot get the app to build, load, and serve client side javascript files build built by vite. Could you add a simple example of how to configure this for deploying to vercel?
Summary tsup is no longer actively maintained and recommends migrating to tsdown. This PR follows that recommendation and replaces tsup with tsdown, which is built on top of rolldown and provides better alignment with the Vite/rolldown ecosystem. For easier review, I also added a link to the actual build output (generated artifacts), which you can inspect directly on GitHub here: https://github.com/nakanoasaservice/honox/pull/3/files Changes Replace with Update , , and scripts to use Auto-generate the field in via tsdown's built-in option, removing the need to maintain it manually Remove non-existent entry from Critical fix: preserve tsdown enables by default, which causes rolldown to resolve calls at library build time. Since does not exist in this repository, all globs would resolve to empty objects βsilently breaking island hydration, auto-routing, and manifest loading for every consumer. Setting preserves the expressions as-is so that the consumer's Vite build can process them correctly, matching the behavior of the previous tsup/esbuild output. Notes on output differences The generated files have minor cosmetic differences compared to tsup (indentation style, comments, import ordering), but are functionally equivalent. One observable difference is that the modifier on re-exports in files is inconsistently applied between tsup and tsdown β in some leaf files (e.g. ) tsdown omits from , while in index files it adds it where tsup did not. This has no practical impact: TypeScript infers type-only status from the original declaration (e.g. ), so consumers with are unaffected for any public import path. Discussion: remove ? is kept as-is for backwards compatibility with older TypeScript versions that do not support the field for type resolution. However, since the field is now the source of truth (and is auto-generated), must be kept in sync manually. Given that TypeScript 4.7+ (released 2022) supports -based type resolution, it may be worth dropping entirely in a future change.
Repository: honojs/honox. Description: HonoX - Hono based meta framework Stars: 2754, Forks: 92. Primary language: TypeScript. Languages: TypeScript (99.9%), JavaScript (0%), MDX (0%). License: MIT. Homepage: https://hono.dev Latest release: v0.1.54 (1w ago). Open PRs: 3, open issues: 58. Last activity: 4d ago. Community health: 50%. Top contributors: yusukebe, usualoma, 3w36zj6, berlysia, muningis, meck93, bruceharrison1984, gobengo, 4513ECHO, ryuapp and others.
TypeScript
Issue: Incorrect package.json exports for ./utils/* The package.json file currently has an export for that points to and . However, the actual utility files are located in: This export is invalid because the directory does not exist. The build process preserves the directory structure of the source files, so the utils are placed in their respective subdirectories. Steps to reproduce: 1. Run 2. Check the directory structure - there is no folder at the top level Expected behavior: The package.json should not export a path since the files are not in that location. If the utils are intended to be exported, they should be exported from their respective directories (e.g., , , ). Current exports in package.json:
What version of HonoX are you using? 0.1.53 What steps can reproduce the bug? Project Structure File: File: File: File: File: File: File: (Direct import of Island component) File: (Indirect import via wrapper) File: (Indirect import + Dummy Island component) Reproduction Steps 1. Build the application: 2. Start the production server: 3. Access the test pages: http://localhost:8000/case1 http://localhost:8000/case2 http://localhost:8000/case3 What is the expected behavior? When clicking the button on all three pages (case1, case2, and case3), the counter should increment. What do you see instead? case1: β Counter increments correctly case2**: β Counter does NOT increment. The `npx vitenpx vite buildnode:22-bookworm-slimnodehonohonox@hono/vite-buildvite`: 7.3.0
What version of HonoX are you using? 0.1.52 What steps can reproduce the bug? In HonoX file-based routing, catch-all route matches correctly, but the captured value cannot be accessed via . File: Access: What is the expected behavior? For , should return (or equivalent), because is intended to capture the rest path segments. What do you see instead? Route is matched correctly is correct (ex: ) returns is always Additional information The file name uses , so it is natural to expect that the captured value is accessible by the name . If the captured value cannot be accessed by name, then the part of becomes meaningless. In that case, a syntax like (without a name) would better represent the actual behavior. It looks like is compiled to a wildcard () route internally. In Hono, wildcard matches are not exposed as named params, so does not work. Related discussion in Hono repo: wildcard params are not accessible as named params (ex: honojs/hono#3190) From user perspective, it would be more intuitive if was compiled to something like: so that the value can be accessed via .