react-router-hono-server 2.17.0 → 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.
Files changed (3) hide show
  1. package/README.md +4 -3
  2. package/dist/dev.js +10 -0
  3. package/package.json +6 -3
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
  > ```
package/dist/dev.js CHANGED
@@ -76,6 +76,16 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
76
76
  "react-dom/server": reactVersion >= 19 ? "react-dom/server.edge" : "react-dom/server.browser"
77
77
  };
78
78
  }
79
+ if (runtime === "bun" && pluginConfig.future.unstable_viteEnvironmentApi) {
80
+ throw new Error(
81
+ "The unstable_viteEnvironmentApi is not supported with the Bun runtime. Please disable it in your react-router.config.ts"
82
+ );
83
+ }
84
+ if (runtime === "bun" && env.command === "build") {
85
+ alias = {
86
+ "react-dom/server": "react-dom/server.node"
87
+ };
88
+ }
79
89
  const ssrConfig = {
80
90
  resolve: {
81
91
  alias
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-hono-server",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "type": "module",
5
5
  "description": "The Vite plugin you need to create a Hono server for your React Router app in less than 10 seconds.",
6
6
  "publishConfig": {
@@ -75,7 +75,7 @@
75
75
  "homepage": "https://github.com/rphlmr/react-router-hono-server#readme",
76
76
  "dependencies": {
77
77
  "@drizzle-team/brocli": "^0.11.0",
78
- "@hono/node-server": "^1.18.0",
78
+ "@hono/node-server": "^1.18.1",
79
79
  "@hono/node-ws": "^1.2.0",
80
80
  "@hono/vite-dev-server": "^0.20.0",
81
81
  "hono": "^4.7.5"
@@ -95,7 +95,7 @@
95
95
  },
96
96
  "peerDependencies": {
97
97
  "@cloudflare/workers-types": "^4.20250317.0",
98
- "@hono/node-server": "1.14.1",
98
+ "@hono/node-server": "^1.18.1",
99
99
  "@react-router/dev": "^7.2.0",
100
100
  "@types/react": "^18.3.10 || ^19.0.0",
101
101
  "miniflare": "^3.20241205.0",
@@ -104,6 +104,9 @@
104
104
  "wrangler": "^4.2.0"
105
105
  },
106
106
  "peerDependenciesMeta": {
107
+ "@hono/node-server": {
108
+ "optional": false
109
+ },
107
110
  "@cloudflare/workers-types": {
108
111
  "optional": true
109
112
  },