From d358ad748d4a099005584da4e8592f7249ec630e Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Thu, 16 Nov 2023 22:44:36 +0900 Subject: [PATCH 1/2] fix(cloudflare-pages): handle `notFoundHandler` --- packages/cloudflare-pages/src/entry/_worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cloudflare-pages/src/entry/_worker.js b/packages/cloudflare-pages/src/entry/_worker.js index 40b609b..d7fd232 100644 --- a/packages/cloudflare-pages/src/entry/_worker.js +++ b/packages/cloudflare-pages/src/entry/_worker.js @@ -7,5 +7,6 @@ worker.get('/favicon.ico', serveStatic()) worker.get('/static/*', serveStatic()) worker.route('/', app) +worker.notFound(app.notFoundHandler) export default worker From c0d019ac077db157bf0a176ab3598c592e504328 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Thu, 16 Nov 2023 22:46:27 +0900 Subject: [PATCH 2/2] changeset --- .changeset/hungry-apricots-juggle.md | 5 +++++ packages/cloudflare-pages/package.json | 2 +- packages/dev-server/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/hungry-apricots-juggle.md diff --git a/.changeset/hungry-apricots-juggle.md b/.changeset/hungry-apricots-juggle.md new file mode 100644 index 0000000..7fdad2e --- /dev/null +++ b/.changeset/hungry-apricots-juggle.md @@ -0,0 +1,5 @@ +--- +'@hono/vite-cloudflare-pages': patch +--- + +fix: handle `notFoundHandler` diff --git a/packages/cloudflare-pages/package.json b/packages/cloudflare-pages/package.json index 8a52883..c032f81 100644 --- a/packages/cloudflare-pages/package.json +++ b/packages/cloudflare-pages/package.json @@ -53,4 +53,4 @@ "engines": { "node": ">=18.14.1" } -} \ No newline at end of file +} diff --git a/packages/dev-server/package.json b/packages/dev-server/package.json index 38cc210..730d412 100644 --- a/packages/dev-server/package.json +++ b/packages/dev-server/package.json @@ -57,4 +57,4 @@ "@hono/node-server": "^1.2.0", "miniflare": "^3.20231016.0" } -} \ No newline at end of file +}