@vercel/remix-builder 5.5.8 → 5.5.10

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 +19 -12
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -2971,7 +2971,7 @@ var build = async ({
2971
2971
  const mountpoint = (0, import_path2.dirname)(entrypoint);
2972
2972
  const entrypointFsDirname = (0, import_path2.join)(workPath, mountpoint);
2973
2973
  const frameworkSettings = config.framework === "react-router" ? REACT_ROUTER_FRAMEWORK_SETTINGS : REMIX_FRAMEWORK_SETTINGS;
2974
- const nodeVersion = await (0, import_build_utils3.getRuntimeNodeVersion)(
2974
+ const nodeVersion = await (0, import_build_utils3.getNodeVersion)(
2975
2975
  entrypointFsDirname,
2976
2976
  void 0,
2977
2977
  config,
@@ -3153,11 +3153,6 @@ var build = async ({
3153
3153
  const output = staticFiles;
3154
3154
  const assetsDir = viteConfig?.build?.assetsDir || "assets";
3155
3155
  const routes = [
3156
- {
3157
- src: `^/${assetsDir}/(.*)$`,
3158
- headers: { "cache-control": "public, max-age=31536000, immutable" },
3159
- continue: true
3160
- },
3161
3156
  {
3162
3157
  handle: "filesystem"
3163
3158
  }
@@ -3187,6 +3182,14 @@ var build = async ({
3187
3182
  src: "/(.*)",
3188
3183
  dest: "/"
3189
3184
  });
3185
+ routes.push({
3186
+ handle: "hit"
3187
+ });
3188
+ routes.push({
3189
+ src: `^/${assetsDir}/(.*)$`,
3190
+ headers: { "cache-control": "public, max-age=31536000, immutable" },
3191
+ continue: true
3192
+ });
3190
3193
  return { routes, output, framework: { version: frameworkVersion } };
3191
3194
  };
3192
3195
  async function traceEdgeFiles({
@@ -3440,7 +3443,7 @@ var build2 = async ({
3440
3443
  await (0, import_build_utils4.download)(files, workPath, meta);
3441
3444
  const mountpoint = (0, import_path4.dirname)(entrypoint);
3442
3445
  const entrypointFsDirname = (0, import_path4.join)(workPath, mountpoint);
3443
- const nodeVersion = await (0, import_build_utils4.getRuntimeNodeVersion)(
3446
+ const nodeVersion = await (0, import_build_utils4.getNodeVersion)(
3444
3447
  entrypointFsDirname,
3445
3448
  void 0,
3446
3449
  config,
@@ -3793,12 +3796,8 @@ module.exports = config;`;
3793
3796
  ...staticFiles,
3794
3797
  ...transformedBuildAssets
3795
3798
  };
3799
+ const assetsPath = remixConfig.publicPath.replace(/^\/|\/$/g, "");
3796
3800
  const routes = [
3797
- {
3798
- src: `^/${remixConfig.publicPath.replace(/^\/|\/$/g, "")}/(.*)$`,
3799
- headers: { "cache-control": "public, max-age=31536000, immutable" },
3800
- continue: true
3801
- },
3802
3801
  {
3803
3802
  handle: "filesystem"
3804
3803
  }
@@ -3840,6 +3839,14 @@ module.exports = config;`;
3840
3839
  src: "/(.*)",
3841
3840
  dest: "/404"
3842
3841
  });
3842
+ routes.push({
3843
+ handle: "hit"
3844
+ });
3845
+ routes.push({
3846
+ src: `^/${assetsPath}/(.*)$`,
3847
+ headers: { "cache-control": "public, max-age=31536000, immutable" },
3848
+ continue: true
3849
+ });
3843
3850
  return { routes, output, framework: { version: remixVersion } };
3844
3851
  };
3845
3852
  function hasScript2(scriptName, pkg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/remix-builder",
3
- "version": "5.5.8",
3
+ "version": "5.5.10",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/jest": "27.5.1",
27
- "@types/node": "14.18.33",
27
+ "@types/node": "20.11.0",
28
28
  "@types/semver": "7.3.13",
29
29
  "glob": "10.3.16",
30
30
  "jest-junit": "16.0.0",
31
31
  "semver": "7.5.2",
32
32
  "vitest": "2.0.1",
33
- "@vercel/build-utils": "13.2.8"
33
+ "@vercel/build-utils": "13.2.16"
34
34
  },
35
35
  "VERCEL_REMIX_RUN_DEV_MAX_VERSION": "2.16.6",
36
36
  "scripts": {