react-router-hono-server 2.19.0 → 2.20.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/dist/dev.js +8 -10
- package/package.json +2 -2
package/dist/dev.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from "path";
|
|
|
4
4
|
import honoDevServer from "@hono/vite-dev-server";
|
|
5
5
|
import bunAdapter from "@hono/vite-dev-server/bun";
|
|
6
6
|
import nodeAdapter from "@hono/vite-dev-server/node";
|
|
7
|
-
var
|
|
7
|
+
var REACT_ROUTER_SERVER_BUILD_MODULE_ID = "\0virtual:react-router/server-build";
|
|
8
8
|
var VIRTUAL_MODULE_ID = "\0virtual:react-router-hono-server/server";
|
|
9
9
|
var REACT_ROUTER_EXPORT = "export { serverManifest as assets, assetsBuildDirectory, basename, entry, future, isSpaMode, prerender, publicPath, routes, ssr, routeDiscovery };";
|
|
10
10
|
function reactRouterHonoServer(options = {}) {
|
|
@@ -34,6 +34,7 @@ function reactRouterHonoServer(options = {}) {
|
|
|
34
34
|
if (!pluginConfig) {
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
+
const serverEntryPoint = pluginConfig.serverEntryPoint;
|
|
37
38
|
if (pluginConfig.future.unstable_viteEnvironmentApi) {
|
|
38
39
|
console.warn(
|
|
39
40
|
"\x1B[33mThe unstable_viteEnvironmentApi is enabled.\nThis is experimental and may break your build.\x1B[0m\n"
|
|
@@ -92,10 +93,10 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
|
|
|
92
93
|
},
|
|
93
94
|
build: {
|
|
94
95
|
rollupOptions: {
|
|
95
|
-
input:
|
|
96
|
+
input: serverEntryPoint,
|
|
96
97
|
output: {
|
|
97
98
|
entryFileNames: (chunk) => {
|
|
98
|
-
chunk.facadeModuleId =
|
|
99
|
+
chunk.facadeModuleId = REACT_ROUTER_SERVER_BUILD_MODULE_ID;
|
|
99
100
|
return "index.js";
|
|
100
101
|
},
|
|
101
102
|
// not invoked when target is webworker (single file output)
|
|
@@ -105,14 +106,11 @@ Please add it to your plugins: import { cloudflareDevProxy } from "@react-router
|
|
|
105
106
|
}
|
|
106
107
|
return "assets/[name]-[hash].js";
|
|
107
108
|
},
|
|
108
|
-
manualChunks: runtime !== "cloudflare" ? (id) => {
|
|
109
|
-
if (id.includes(
|
|
110
|
-
return
|
|
109
|
+
manualChunks: runtime !== "cloudflare" ? (id, meta) => {
|
|
110
|
+
if (meta.getModuleInfo(id)?.importers.some((id2) => id2.includes(serverEntryPoint))) {
|
|
111
|
+
return path.basename(id, path.extname(id));
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
-
return "server";
|
|
114
|
-
}
|
|
115
|
-
return "chunk";
|
|
113
|
+
return void 0;
|
|
116
114
|
} : void 0,
|
|
117
115
|
// We are doing that because we build a single file that only exports the Hono server
|
|
118
116
|
// RR needs its exports for prerendering
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-router-hono-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.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": {
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"validate": "npm run check && npm run tsc",
|
|
132
132
|
"clear-all": "rm -rf node_modules pnpm-lock.yaml && find ./examples -type d -name 'node_modules' -exec rm -rf {} + && find ./examples -name 'pnpm-lock.yaml' -exec rm -f {} +",
|
|
133
133
|
"changeset": "changeset",
|
|
134
|
-
"version": "changeset version",
|
|
134
|
+
"version": "changeset version && biome format --write package.json",
|
|
135
135
|
"release": "changeset publish",
|
|
136
136
|
"changeset:next": "changeset pre enter next",
|
|
137
137
|
"changeset:next:exit": "changeset pre exit"
|