patternlab-node-cli icon indicating copy to clipboard operation
patternlab-node-cli copied to clipboard

Watching with serve doesn't work on Windows

Open CaitlinWeb opened this issue 6 years ago • 0 comments

General information

  • NodeJS version: 9.4.0
  • NPM version: 6.4.1

Problem description

On Windows 10 the use of path often returns \ as the path separator. As described in paulmillr/chokidar#777 this causes watched paths with globs to fail.

(Edited) The (temporary?) solution is to use replace(/\\/g, '/') on the path strings to ensure / is used instead.

I could open a PR if that's helpful.

Reproduction steps

With an initialized patternlab: ./node_modules/.bin/patternlab serve --watch

CaitlinWeb avatar Nov 19 '18 15:11 CaitlinWeb