@vercel/remix-builder 5.9.0 → 5.9.2

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/index.js +5 -1
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -3198,6 +3198,7 @@ var build = async ({
3198
3198
  const staticFileKeys = new Set(Object.keys(staticFiles));
3199
3199
  const prerenderRewrites = [];
3200
3200
  const routes = [];
3201
+ let hasReactRouterIndexFunction = false;
3201
3202
  for (const [id, functionId] of Object.entries(
3202
3203
  buildManifest.routeIdToServerBundleId ?? {}
3203
3204
  )) {
@@ -3221,6 +3222,9 @@ var build = async ({
3221
3222
  }
3222
3223
  output[path] = func;
3223
3224
  if (isReactRouter) {
3225
+ if (path === "index") {
3226
+ hasReactRouterIndexFunction = true;
3227
+ }
3224
3228
  for (const dataPath of getReactRouterDataPaths(path)) {
3225
3229
  if (!staticFileKeys.has(dataPath)) {
3226
3230
  output[dataPath] = func;
@@ -3247,7 +3251,7 @@ var build = async ({
3247
3251
  routes.unshift(...prerenderRewrites, { handle: "filesystem" });
3248
3252
  routes.push({
3249
3253
  src: "/(.*)",
3250
- dest: isReactRouter ? getReactRouterCatchAllDest() : "/"
3254
+ dest: isReactRouter && hasReactRouterIndexFunction ? getReactRouterCatchAllDest() : "/"
3251
3255
  });
3252
3256
  routes.push({
3253
3257
  handle: "hit"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/remix-builder",
3
- "version": "5.9.0",
3
+ "version": "5.9.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -19,8 +19,8 @@
19
19
  "path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
20
20
  "path-to-regexp": "6.1.0",
21
21
  "ts-morph": "12.0.0",
22
- "@vercel/error-utils": "2.2.0",
23
- "@vercel/static-config": "3.4.0"
22
+ "@vercel/error-utils": "2.2.1",
23
+ "@vercel/static-config": "3.4.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "20.11.0",
@@ -28,7 +28,7 @@
28
28
  "glob": "10.3.16",
29
29
  "semver": "7.5.2",
30
30
  "vitest": "2.0.1",
31
- "@vercel/build-utils": "13.28.0"
31
+ "@vercel/build-utils": "14.0.1"
32
32
  },
33
33
  "VERCEL_REMIX_RUN_DEV_MAX_VERSION": "2.16.6",
34
34
  "scripts": {