fix(build): generate `_routes.json` based on public directory
Fixes #260
⚠️ No Changeset found
Latest commit: 3b101365965e7cba85439c4f5ac3f3f8226dd6da
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Thank you @yusukebe for working on #260.
I did some checks.
- [x] Add/remove new files/directories to
public/and they will be added/removed to_routes.json. - [x]
_routes.jsonis not regenerated by Vite if it is present inpublic/. - [ ] When I delete a files/directories from
public/, they will also be removed fromdist. https://github.com/honojs/vite-plugins/issues/260#issuecomment-2846310270 In the example below, fixing this can cause problems. https://zenn.dev/yusukebe/articles/06d9cc1714bfb7
The last one can be a problem when _worker.js uses env.ASSETS.fetch().
@akku1139
Can you write a test for this?
When I delete a files/directories from
public/, they will also be removed fromdist.