diff --git a/packages/vite/src/node/optimizer/index.ts b/packages/vite/src/node/optimizer/index.ts index 2f696d25bd57f2..a1ea5f06e65812 100644 --- a/packages/vite/src/node/optimizer/index.ts +++ b/packages/vite/src/node/optimizer/index.ts @@ -1259,7 +1259,7 @@ function getLockfileHash(environment: Environment): string { if (lockfileFormat.checkPatchesDir) { // Default of https://github.com/ds300/patch-package const baseDir = lockfilePath.slice(0, -lockfileFormat.path.length) - const fullPath = path.join(baseDir, lockfileFormat.checkPatchesDir) + const fullPath = path.join(baseDir, lockfileFormat.checkPatchesDir as string) const stat = tryStatSync(fullPath) if (stat?.isDirectory()) { content += stat.mtimeMs.toString()