Skip to content

Commit

Permalink
fix: don't start watching files in "run" mode (#2680)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jan 16, 2023
1 parent 8509628 commit 0a31e85
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/vitest/src/node/plugins/index.ts
Expand Up @@ -172,6 +172,15 @@ export async function VitestPlugin(options: UserConfig = {}, ctx = new Vitest('t

for (const name in envs)
process.env[name] ??= envs[name]

// don't watch files in run mode
if (!options.watch) {
viteConfig.server.watch = {
persistent: false,
depth: 0,
ignored: ['**/*'],
}
}
},
async configureServer(server) {
try {
Expand Down

0 comments on commit 0a31e85

Please sign in to comment.