Skip to content

Commit

Permalink
fix(config): server restart on config dependencies changed on windows (
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Mar 20, 2022
1 parent 9a7b133 commit c43467a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,9 @@ export async function resolveConfig(
const resolved: ResolvedConfig = {
...config,
configFile: configFile ? normalizePath(configFile) : undefined,
configFileDependencies,
configFileDependencies: configFileDependencies.map((name) =>
normalizePath(path.resolve(name))
),
inlineConfig,
root: resolvedRoot,
base: BASE_URL,
Expand Down
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 @@ -47,7 +47,7 @@ export async function handleHMRUpdate(

const isConfig = file === config.configFile
const isConfigDependency = config.configFileDependencies.some(
(name) => file === path.resolve(name)
(name) => file === name
)
const isEnv =
config.inlineConfig.envFile !== false &&
Expand Down

0 comments on commit c43467a

Please sign in to comment.