@vercel/remix-builder 5.4.1 → 5.4.3

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 +10 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2589,9 +2589,10 @@ function* getRouteIterator(route, routes) {
2589
2589
  }
2590
2590
  } while (currentRoute);
2591
2591
  }
2592
- function getPathFromRoute(route, routes) {
2593
- if (route.id === "root" || route.parentId === "root" && (!route.path || route.path === "/") && route.index) {
2594
- return { path: "index", rePath: "/index" };
2592
+ function getPathFromRoute(input, routes) {
2593
+ let route = input;
2594
+ if (route.id === "root" || (!route.path || route.path === "/") && route.index) {
2595
+ route = { ...route, path: "index" };
2595
2596
  }
2596
2597
  const pathParts = [];
2597
2598
  const rePathParts = [];
@@ -2615,6 +2616,10 @@ function getPathFromRoute(route, routes) {
2615
2616
  }
2616
2617
  }
2617
2618
  }
2619
+ if (pathParts.length > 1 && pathParts[0] === "index") {
2620
+ pathParts.shift();
2621
+ rePathParts.shift();
2622
+ }
2618
2623
  const path = pathParts.reverse().join("/");
2619
2624
  let rePath = rePathParts.reverse().join("/");
2620
2625
  rePath = rePath === "*" ? SPLAT_PATH : `/${rePath.replace(/\/\*$/, SPLAT_PATH)}`;
@@ -2859,7 +2864,7 @@ var REMIX_FRAMEWORK_SETTINGS = {
2859
2864
  serverEntryPoint,
2860
2865
  frameworkVersion,
2861
2866
  config,
2862
- frameworkRuntimeSettings: this.getRuntimeSettings(config),
2867
+ frameworkRuntimeSettings: this.getRuntimeSettings(config.runtime),
2863
2868
  sourceSearchValue: this.sourceSearchValue,
2864
2869
  frameworkSlug: this.slug,
2865
2870
  nodeVersion
@@ -2907,7 +2912,7 @@ var REACT_ROUTER_FRAMEWORK_SETTINGS = {
2907
2912
  serverEntryPoint,
2908
2913
  frameworkVersion,
2909
2914
  config,
2910
- frameworkRuntimeSettings: this.getRuntimeSettings(config),
2915
+ frameworkRuntimeSettings: this.getRuntimeSettings(config.runtime),
2911
2916
  sourceSearchValue: this.sourceSearchValue,
2912
2917
  frameworkSlug: this.slug,
2913
2918
  nodeVersion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/remix-builder",
3
- "version": "5.4.1",
3
+ "version": "5.4.3",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -26,7 +26,7 @@
26
26
  "@types/jest": "27.5.1",
27
27
  "@types/node": "14.18.33",
28
28
  "@types/semver": "7.3.13",
29
- "@vercel/build-utils": "10.3.0",
29
+ "@vercel/build-utils": "10.5.1",
30
30
  "glob": "10.3.16",
31
31
  "jest-junit": "16.0.0",
32
32
  "semver": "7.5.2",