Skip to content

Commit

Permalink
chore: disable hmr if watch is not true
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jul 28, 2023
1 parent 57e7d72 commit 98cef79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite-node/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ async function run(files: string[], options: CliOptions = {}) {
configFile: options.config,
root: options.root,
mode: options.mode,
server: {
hmr: !!options.watch,
},
plugins: [
options.watch && viteNodeHmrPlugin(),
],
Expand Down

0 comments on commit 98cef79

Please sign in to comment.