react-router-hono-server 2.17.0-next.2 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,15 +47,16 @@ Install the following npm package.
47
47
  > This is not a dev dependency, as it creates the Hono server used in production.
48
48
 
49
49
  ```bash
50
- npm install react-router-hono-server
50
+ npm install react-router-hono-server hono @hono/node-server
51
+
52
+ # For Bun you can install @hono/node-server as a dev dependency
53
+ bun install -D @hono/node-server
51
54
 
52
55
  # For Cloudflare Workers, add the following
53
56
  npm install -D miniflare wrangler
54
57
  ```
55
58
 
56
59
  > [!TIP]
57
- > You don't need to install `hono` as it is included in this package.
58
- >
59
60
  > If you use `pnpm`, and want to use some imports from `hono`, you may need to install `hono` manually or create a `.npmrc` file in your project with the following content:
60
61
  >
61
62
  > ```
@@ -1,6 +1,3 @@
1
- import {
2
- serveStatic
3
- } from "../chunk-QDN4PJRA.js";
4
1
  import {
5
2
  bindIncomingRequestSocketInfo,
6
3
  createGetLoadContext,
@@ -10,9 +7,9 @@ import {
10
7
  import {
11
8
  cache
12
9
  } from "../chunk-YI5FED4X.js";
13
- import "../chunk-JSBRDJBE.js";
14
10
 
15
11
  // src/adapters/aws-lambda.ts
12
+ import { serveStatic } from "@hono/node-server/serve-static";
16
13
  import { Hono } from "hono";
17
14
  import { handle, streamHandle } from "hono/aws-lambda";
18
15
  import { createMiddleware } from "hono/factory";
@@ -9,7 +9,6 @@ import {
9
9
  import {
10
10
  cache
11
11
  } from "../chunk-YI5FED4X.js";
12
- import "../chunk-JSBRDJBE.js";
13
12
 
14
13
  // src/adapters/bun.ts
15
14
  import * as build from "virtual:react-router/server-build";
@@ -7,7 +7,6 @@ import {
7
7
  import {
8
8
  cache
9
9
  } from "../chunk-YI5FED4X.js";
10
- import "../chunk-JSBRDJBE.js";
11
10
 
12
11
  // src/adapters/cloudflare.ts
13
12
  import { Hono } from "hono";
@@ -40,7 +39,7 @@ async function createHonoServer(options) {
40
39
  serveCloudflareAssets()
41
40
  );
42
41
  } else {
43
- const { serveStatic } = await import("../serve-static-6NLY75NK.js");
42
+ const { serveStatic } = await import("@hono/node-server/serve-static");
44
43
  app.use(
45
44
  "*",
46
45
  cache(60 * 60),
@@ -1,9 +1,3 @@
1
- import {
2
- serve
3
- } from "../chunk-OKB2FS67.js";
4
- import {
5
- serveStatic
6
- } from "../chunk-QDN4PJRA.js";
7
1
  import {
8
2
  bindIncomingRequestSocketInfo,
9
3
  cleanUpgradeListeners,
@@ -15,10 +9,11 @@ import {
15
9
  import {
16
10
  cache
17
11
  } from "../chunk-YI5FED4X.js";
18
- import "../chunk-JSBRDJBE.js";
19
12
 
20
13
  // src/adapters/node.ts
21
14
  import * as build from "virtual:react-router/server-build";
15
+ import { serve } from "@hono/node-server";
16
+ import { serveStatic } from "@hono/node-server/serve-static";
22
17
  import { Hono } from "hono";
23
18
  import { createMiddleware } from "hono/factory";
24
19
  import { logger } from "hono/logger";