Compare commits

...

6 Commits

Author SHA1 Message Date
Nathan Rajlich
037eccf94c . 2022-06-17 00:06:48 -07:00
Nathan Rajlich
7502e1d4c1 Ignore .vercel/** in glob 2022-06-16 23:48:48 -07:00
Nathan Rajlich
97c8f7f443 Force isMonorepo to false 2022-06-16 23:33:57 -07:00
Nathan Rajlich
568c9db32c more debug 2022-06-16 21:15:30 -07:00
Nathan Rajlich
e459f6bdfa JSON 2022-06-16 20:17:38 -07:00
Nathan Rajlich
93585ba60b [next] Debug prepareCache() 2022-06-16 19:01:59 -07:00

View File

@@ -2557,12 +2557,11 @@ export const build: BuildV2 = async ({
};
};
export const prepareCache: PrepareCache = async ({
workPath,
repoRootPath,
entrypoint,
config = {},
}) => {
export const prepareCache: PrepareCache = async opts => {
const { files, ...optsWithoutFiles } = opts;
console.log(JSON.stringify(Object.keys(files)));
console.log(JSON.stringify(optsWithoutFiles));
const { workPath, repoRootPath, entrypoint, config = {} } = opts;
debug('Preparing cache...');
const entryDirectory = path.dirname(entrypoint);
const entryPath = path.join(workPath, entryDirectory);
@@ -2582,12 +2581,26 @@ export const prepareCache: PrepareCache = async ({
const isMonorepo = repoRootPath && repoRootPath !== workPath;
const cacheBasePath = repoRootPath || workPath;
const cacheEntrypoint = path.relative(cacheBasePath, entryPath);
console.log({
workPath,
repoRootPath,
entrypoint,
config,
entryDirectory,
entryPath,
outputDirectory,
nextVersionRange,
isLegacy,
isMonorepo,
cacheBasePath,
cacheEntrypoint,
});
const cache = {
...(await glob(
isMonorepo
? '**/node_modules/**'
: path.join(cacheEntrypoint, 'node_modules/**'),
cacheBasePath
{ cwd: cacheBasePath, ignore: ['.vercel/**'] }
)),
...(await glob(
path.join(cacheEntrypoint, outputDirectory, 'cache/**'),