@vercel/remix-builder 5.9.0 → 5.9.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/index.js +5 -1
- package/package.json +2 -2
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.
|
|
3
|
+
"version": "5.9.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"homepage": "https://vercel.com/docs",
|
|
@@ -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.
|
|
31
|
+
"@vercel/build-utils": "13.29.1"
|
|
32
32
|
},
|
|
33
33
|
"VERCEL_REMIX_RUN_DEV_MAX_VERSION": "2.16.6",
|
|
34
34
|
"scripts": {
|