fix: hmr for env files, regression from #15365 (#15559)

This commit is contained in:
patak 2024-01-10 13:24:52 +01:00 committed by GitHub
parent db28b92caf
commit d1b143fd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ export async function handleHMRUpdate(
const isEnv =
config.inlineConfig.envFile !== false &&
getEnvFilesForMode(config.mode, config.envDir).includes(fileName)
getEnvFilesForMode(config.mode, config.envDir).includes(file)
if (isConfig || isConfigDependency || isPackageJson || isEnv) {
// auto restart server
debugHmr?.(`[config change] ${colors.dim(shortFile)}`)