Skip to content

Commit 9943ab3

Browse files
committed
Check both lock files
1 parent 959c336 commit 9943ab3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

server/src/incrementalCompilation.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,18 @@ function triggerIncrementalCompilationOfFile(
255255
return;
256256
}
257257

258-
const projectRewatchLockfile = path.resolve(
259-
projectRootPath,
260-
c.rewatchLockPartialPath,
261-
);
258+
const projectRewatchLockfiles = [
259+
path.resolve(projectRootPath, c.rewatchLockPartialPath),
260+
path.resolve(projectRootPath, c.rescriptLockPartialPath),
261+
];
262262

263263
let foundRewatchLockfileInProjectRoot = false;
264-
if (fs.existsSync(projectRewatchLockfile)) {
264+
if (projectRewatchLockfiles.some((lockFile) => fs.existsSync(lockFile))) {
265265
foundRewatchLockfileInProjectRoot = true;
266+
} else if (debug()) {
267+
console.log(
268+
`Did not find ${projectRewatchLockfiles.join(" or ")} in project root, assuming bsb`,
269+
);
266270
}
267271

268272
// if we find a rewatch.lock in the project root, it's a compilation of a local package

0 commit comments

Comments
 (0)