react-router-hono-server 2.8.5 → 2.9.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 (2) hide show
  1. package/dist/dev.js +6 -7
  2. package/package.json +3 -3
package/dist/dev.js CHANGED
@@ -163,15 +163,14 @@ function resolvePluginConfig(config, options) {
163
163
  if (!("__reactRouterPluginContext" in config)) {
164
164
  return null;
165
165
  }
166
- const reactRouterConfig = config.__reactRouterPluginContext;
167
- const rootDirectory = reactRouterConfig.rootDirectory;
168
- const buildDirectory = path.relative(rootDirectory, reactRouterConfig.reactRouterConfig.buildDirectory);
169
- const appDirectory = path.relative(rootDirectory, reactRouterConfig.reactRouterConfig.appDirectory);
170
- const isSsrBuild = reactRouterConfig.isSsrBuild;
166
+ const { reactRouterConfig, environmentBuildContext, rootDirectory } = config.__reactRouterPluginContext;
167
+ const buildDirectory = path.relative(rootDirectory, reactRouterConfig.buildDirectory);
168
+ const appDirectory = path.relative(rootDirectory, reactRouterConfig.appDirectory);
169
+ const isSsrBuild = environmentBuildContext?.name === "ssr";
171
170
  const assetsDir = config.build?.assetsDir || "assets";
172
171
  const serverEntryPoint = options.serverEntryPoint || findDefaultServerEntry(appDirectory);
173
- const serverBuildFile = reactRouterConfig.reactRouterConfig.serverBuildFile;
174
- const basename = reactRouterConfig.reactRouterConfig.basename;
172
+ const serverBuildFile = reactRouterConfig.serverBuildFile;
173
+ const basename = reactRouterConfig.basename;
175
174
  return {
176
175
  rootDirectory,
177
176
  buildDirectory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router-hono-server",
3
- "version": "2.8.5",
3
+ "version": "2.9.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
  "exports": {
@@ -101,9 +101,9 @@
101
101
  "peerDependencies": {
102
102
  "@cloudflare/workers-types": "^4.20241112.0",
103
103
  "@types/react": "^18.3.10 || ^19.0.0",
104
- "@react-router/dev": "^7.0.0",
104
+ "@react-router/dev": "^7.2.0",
105
105
  "miniflare": "^3.20241205.0",
106
- "react-router": "^7.1.0",
106
+ "react-router": "^7.2.0",
107
107
  "vite": "^5.1.0 || ^6.0.0",
108
108
  "wrangler": "^3.91.0"
109
109
  },