@vercel/remix-builder 2.1.3 → 2.1.4

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 +35 -33
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -4103,39 +4103,41 @@ var prepareCache = async ({
4103
4103
  const root = repoRootPath || workPath;
4104
4104
  const mountpoint = (0, import_path5.dirname)(entrypoint);
4105
4105
  const entrypointFsDirname = (0, import_path5.join)(workPath, mountpoint);
4106
- const nodeVersion = await (0, import_build_utils5.getNodeVersion)(
4107
- entrypointFsDirname,
4108
- void 0,
4109
- config
4110
- );
4111
- const spawnOpts = (0, import_build_utils5.getSpawnOptions)({}, nodeVersion);
4112
- await (0, import_build_utils5.runNpmInstall)(
4113
- entrypointFsDirname,
4114
- [],
4115
- {
4116
- ...spawnOpts,
4117
- stdio: "ignore"
4118
- },
4119
- void 0,
4120
- nodeVersion
4121
- );
4122
- const packageJsonPath = (0, import_path5.join)(entrypointFsDirname, "package.json");
4123
- const remixRunDevPath = (0, import_path5.dirname)(
4124
- require_.resolve("@remix-run/dev/package.json", {
4125
- paths: [entrypointFsDirname]
4126
- })
4127
- );
4128
- const remixConfig = await chdirAndReadConfig(
4129
- remixRunDevPath,
4130
- entrypointFsDirname,
4131
- packageJsonPath
4132
- );
4133
- const [nodeModulesFiles, cacheDirFiles] = await Promise.all([
4134
- // Cache `node_modules`
4135
- (0, import_build_utils5.glob)("**/node_modules/**", root),
4136
- // Cache the Remix "cacheDirectory" (typically `.cache`)
4137
- (0, import_build_utils5.glob)((0, import_path5.relative)(root, (0, import_path5.join)(remixConfig.cacheDirectory, "**")), root)
4138
- ]);
4106
+ let cacheDirFiles;
4107
+ if (!isVite(workPath)) {
4108
+ const nodeVersion = await (0, import_build_utils5.getNodeVersion)(
4109
+ entrypointFsDirname,
4110
+ void 0,
4111
+ config
4112
+ );
4113
+ const spawnOpts = (0, import_build_utils5.getSpawnOptions)({}, nodeVersion);
4114
+ await (0, import_build_utils5.runNpmInstall)(
4115
+ entrypointFsDirname,
4116
+ [],
4117
+ {
4118
+ ...spawnOpts,
4119
+ stdio: "ignore"
4120
+ },
4121
+ void 0,
4122
+ nodeVersion
4123
+ );
4124
+ const packageJsonPath = (0, import_path5.join)(entrypointFsDirname, "package.json");
4125
+ const remixRunDevPath = (0, import_path5.dirname)(
4126
+ require_.resolve("@remix-run/dev/package.json", {
4127
+ paths: [entrypointFsDirname]
4128
+ })
4129
+ );
4130
+ const remixConfig = await chdirAndReadConfig(
4131
+ remixRunDevPath,
4132
+ entrypointFsDirname,
4133
+ packageJsonPath
4134
+ );
4135
+ cacheDirFiles = await (0, import_build_utils5.glob)(
4136
+ (0, import_path5.relative)(root, (0, import_path5.join)(remixConfig.cacheDirectory, "**")),
4137
+ root
4138
+ );
4139
+ }
4140
+ const nodeModulesFiles = await (0, import_build_utils5.glob)("**/node_modules/**", root);
4139
4141
  return { ...nodeModulesFiles, ...cacheDirFiles };
4140
4142
  };
4141
4143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/remix-builder",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://vercel.com/docs",
@@ -25,7 +25,7 @@
25
25
  "@types/jest": "27.5.1",
26
26
  "@types/node": "14.18.33",
27
27
  "@types/semver": "7.3.13",
28
- "@vercel/build-utils": "7.9.0",
28
+ "@vercel/build-utils": "7.9.1",
29
29
  "jest-junit": "16.0.0",
30
30
  "path-to-regexp": "6.2.1",
31
31
  "semver": "7.5.2"