Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxi): ignore buildDir on windows too (#3999)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Mar 31, 2022
1 parent fdd6a91 commit e4956c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxi/src/commands/dev.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve, relative } from 'pathe'
import { resolve, relative, normalize } from 'pathe'
import chokidar from 'chokidar'
import { debounce } from 'perfect-debounce'
import type { Nuxt } from '@nuxt/schema'
Expand Down Expand Up @@ -73,7 +73,7 @@ export default defineNuxtCommand({
const watcher = chokidar.watch([rootDir], { ignoreInitial: true, depth: 1 })
watcher.on('all', (event, file) => {
if (!currentNuxt) { return }
if (file.startsWith(withTrailingSlash(currentNuxt.options.buildDir))) { return }
if (normalize(file).startsWith(withTrailingSlash(normalize(currentNuxt.options.buildDir)))) { return }
if (file.match(/(nuxt\.config\.(js|ts|mjs|cjs)|\.nuxtignore|\.env|\.nuxtrc)$/)) {
dLoad(true, `${relative(rootDir, file)} updated`)
}
Expand Down

0 comments on commit e4956c5

Please sign in to comment.