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 = const isEnv =
config.inlineConfig.envFile !== false && config.inlineConfig.envFile !== false &&
getEnvFilesForMode(config.mode, config.envDir).includes(fileName) getEnvFilesForMode(config.mode, config.envDir).includes(file)
if (isConfig || isConfigDependency || isPackageJson || isEnv) { if (isConfig || isConfigDependency || isPackageJson || isEnv) {
// auto restart server // auto restart server
debugHmr?.(`[config change] ${colors.dim(shortFile)}`) debugHmr?.(`[config change] ${colors.dim(shortFile)}`)