Skip to content

Commit

Permalink
fix: fix server.watch option ignore overwriting defaults (#1680)
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Jan 24, 2021
1 parent a92f430 commit 33cffa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/server/index.ts
Expand Up @@ -255,12 +255,12 @@ export async function createServer(
: await resolveHttpServer(serverConfig, middlewares)
const ws = createWebSocketServer(httpServer, config)

const watchOptions = serverConfig.watch || {}
const { ignored = [], ...watchOptions } = serverConfig.watch || {}
const watcher = chokidar.watch(root, {
ignored: [
'**/node_modules/**',
'**/.git/**',
...(watchOptions.ignored || [])
...ignored
],
ignoreInitial: true,
ignorePermissionErrors: true,
Expand Down

0 comments on commit 33cffa3

Please sign in to comment.