react-router-hono-server 2.23.0 → 2.24.1
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/dist/dev.js +10 -8
- package/package.json +14 -13
package/dist/dev.js
CHANGED
|
@@ -34,11 +34,13 @@ function reactRouterHonoServer(options = {}) {
|
|
|
34
34
|
if (!pluginConfig) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
+
const isEnvironmentApiEnabled = pluginConfig.future.unstable_viteEnvironmentApi ?? pluginConfig.future.v8_viteEnvironmentApi;
|
|
38
|
+
const flagName = pluginConfig.future.unstable_viteEnvironmentApi ? "unstable_viteEnvironmentApi" : "v8_viteEnvironmentApi";
|
|
37
39
|
const serverEntryPoint = pluginConfig.serverEntryPoint;
|
|
38
|
-
if (
|
|
39
|
-
console.warn(
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
if (isEnvironmentApiEnabled) {
|
|
41
|
+
console.warn(`\x1B[33mThe ${flagName} is enabled.
|
|
42
|
+
This is experimental and may break your build.\x1B[0m
|
|
43
|
+
`);
|
|
42
44
|
}
|
|
43
45
|
if (env.mode === "development" && runtime === "cloudflare" && !config.plugins?.find((p) => p && "name" in p && p.name === "react-router-cloudflare-vite-dev-proxy")) {
|
|
44
46
|
console.warn(
|
|
@@ -63,7 +65,7 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
|
|
|
63
65
|
external: ["@hono/node-ws"]
|
|
64
66
|
}
|
|
65
67
|
};
|
|
66
|
-
if (!
|
|
68
|
+
if (!isEnvironmentApiEnabled && !pluginConfig.isSsrBuild) {
|
|
67
69
|
return baseConfig;
|
|
68
70
|
}
|
|
69
71
|
let reactRouterBuildFile = pluginConfig.serverBuildFile;
|
|
@@ -77,9 +79,9 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
|
|
|
77
79
|
"react-dom/server": reactVersion >= 19 ? "react-dom/server.edge" : "react-dom/server.browser"
|
|
78
80
|
};
|
|
79
81
|
}
|
|
80
|
-
if (runtime === "bun" &&
|
|
82
|
+
if (runtime === "bun" && isEnvironmentApiEnabled) {
|
|
81
83
|
throw new Error(
|
|
82
|
-
|
|
84
|
+
`The ${flagName} is not supported with the Bun runtime. Please disable it in your react-router.config.ts`
|
|
83
85
|
);
|
|
84
86
|
}
|
|
85
87
|
if (runtime === "bun" && env.command === "build") {
|
|
@@ -119,7 +121,7 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
|
|
|
119
121
|
}
|
|
120
122
|
}
|
|
121
123
|
};
|
|
122
|
-
if (
|
|
124
|
+
if (isEnvironmentApiEnabled) {
|
|
123
125
|
return {
|
|
124
126
|
...baseConfig,
|
|
125
127
|
environments: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-router-hono-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.1",
|
|
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,30 +75,31 @@
|
|
|
75
75
|
],
|
|
76
76
|
"homepage": "https://github.com/rphlmr/react-router-hono-server#readme",
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@drizzle-team/brocli": "
|
|
79
|
-
"@hono/node-server": "
|
|
80
|
-
"@hono/node-ws": "
|
|
81
|
-
"@hono/vite-dev-server": "
|
|
82
|
-
"hono": "^4.11.4"
|
|
78
|
+
"@drizzle-team/brocli": "0.11.0",
|
|
79
|
+
"@hono/node-server": "1.19.9",
|
|
80
|
+
"@hono/node-ws": "1.3.0",
|
|
81
|
+
"@hono/vite-dev-server": "0.25.0"
|
|
83
82
|
},
|
|
84
83
|
"devDependencies": {
|
|
85
84
|
"@biomejs/biome": "^2.3.1",
|
|
86
|
-
"@changesets/cli": "^2.29.
|
|
85
|
+
"@changesets/cli": "^2.29.8",
|
|
87
86
|
"@cloudflare/workers-types": "^4.20250405.0",
|
|
88
|
-
"@types/bun": "^1.3.
|
|
89
|
-
"@types/node": "^22.
|
|
90
|
-
"@vitest/coverage-v8": "^4.0.
|
|
91
|
-
"
|
|
87
|
+
"@types/bun": "^1.3.6",
|
|
88
|
+
"@types/node": "^22.19.10",
|
|
89
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
90
|
+
"hono": "4.11.9",
|
|
91
|
+
"lefthook": "^2.0.16",
|
|
92
92
|
"npm-run-all": "^4.1.5",
|
|
93
|
-
"tsup": "^8.5.
|
|
93
|
+
"tsup": "^8.5.1",
|
|
94
94
|
"typescript": "^5.9.3",
|
|
95
|
-
"vitest": "^4.0.
|
|
95
|
+
"vitest": "^4.0.18"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@cloudflare/workers-types": "^4.20250317.0",
|
|
99
99
|
"@hono/node-server": "^1.19.0",
|
|
100
100
|
"@react-router/dev": "^7.9.0",
|
|
101
101
|
"@types/react": "^19.0.0",
|
|
102
|
+
"hono": "^4.11.0",
|
|
102
103
|
"miniflare": "^3.20241205.0",
|
|
103
104
|
"react-router": "^7.9.0",
|
|
104
105
|
"vite": "^7.0.0",
|