Skip to content

Commit

Permalink
fix: hmr for env files, regression from #15365 (#15559)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jan 10, 2024
1 parent db28b92 commit d1b143f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`)
Expand Down

0 comments on commit d1b143f

Please sign in to comment.