@vercel/remix-builder 5.4.0 → 5.4.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 +9 -4
  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)}`;
@@ -3106,7 +3111,7 @@ var build = async ({
3106
3111
  }
3107
3112
  if (!buildResult) {
3108
3113
  throw new Error(
3109
- "Could not determine build output directory. Please configure the `vercelPreset()` Preset from the `@vercel/remix` npm package"
3114
+ `Could not determine build output directory. Please configure the \`vercelPreset()\` Preset from the \`@vercel/${frameworkSettings.slug}\` npm package`
3110
3115
  );
3111
3116
  }
3112
3117
  const { buildManifest, viteConfig } = buildResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/remix-builder",
3
- "version": "5.4.0",
3
+ "version": "5.4.2",
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.2.0",
29
+ "@vercel/build-utils": "10.3.1",
30
30
  "glob": "10.3.16",
31
31
  "jest-junit": "16.0.0",
32
32
  "semver": "7.5.2",