Closed yusukebe closed 6 months ago
Latest commit: 84b90c498402aaf233526b12e3f2305d2d2ee95e
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hey @yudai-nkt, @nakasyou, @ryuapp!
I've created this PR to resolve both #110 and #116. With this PR, static file paths will automatically be added to worker.js
and _routes.json
without explicitly specifying paths.
I think this is great. Can you review it?
@yudai-nkt @ryuapp
Sorry for being super late. I've updated it. Could you review this?
@ryuapp
Thank you! I'll merge this now. Let's go with it!
Fixes #110, #116
With this PR, the Vite plugin detects static files in the
public
directory and adds paths forserveStatic()
inworker.js
. And, this will emit_routes.json
as a default.The function that detects static files automatically is heavily inspired by @yudai-nkt 's https://github.com/yudai-nkt/awesome-hono/blob/main/vite-plugins/auto-exclude-static-routes.ts. I'll make @yudai-nkt a co-author.