Skip to content

Commit

Permalink
perf(server): only watch .env files in envDir (#12587)
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed Mar 26, 2023
1 parent 2d9e691 commit 26d8e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/index.ts
Expand Up @@ -361,7 +361,7 @@ export async function createServer(

const watcher = chokidar.watch(
// config file dependencies and env file might be outside of root
[root, ...config.configFileDependencies, config.envDir],
[root, ...config.configFileDependencies, path.join(config.envDir, '.env*')],
resolvedWatchOptions,
) as FSWatcher

Expand Down

0 comments on commit 26d8e72

Please sign in to comment.