Skip to content

On Windows, the chokidar watcher does not work well #348

Closed
@meteorlxy

Description

@meteorlxy
  • OS: Windows 10 x64
  • Node v8.11.1

Related to #346 , not only components, but also markdown files.

The current setting of chokidar only tracks the existed files, but does not track new files on Windows. (Maybe this is an issue of chokidar)

vuepress/lib/dev.js

Lines 30 to 41 in d9b290b

// watch add/remove of files
const pagesWatcher = chokidar.watch([
path.join(sourceDir, '**/*.md'),
path.join(sourceDir, '.vuepress/components/**/*.vue')
], {
ignored: '.vuepress/**/*.md',
ignoreInitial: true
})
pagesWatcher.on('add', update)
pagesWatcher.on('unlink', update)
pagesWatcher.on('addDir', update)
pagesWatcher.on('unlinkDir', update)

In addtion, unlinking a markdown/component file will cause an webapck error first, and then successfully compiled after the prepare finish. Could be enhanced somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions