tapio / live-server

A simple development http server with live reload capability.
http://tapiov.net/live-server/
4.43k stars 484 forks source link

[Request] Pass watch options to chokidar #363

Open moos opened 3 years ago

moos commented 3 years ago

Issue description

Working on a mounted drive runs into chokidar issue and does not detect changes. The usePolling chokidar option fixes this. It'd be great if a watchOptions param can be passed to chokidar. e.g.

liveServer.start({
    root: '.',
    ignore: ['node_modules', 'vendor'],
    watchOptions: {
      usePolling: true
    },
});

Software details

I'm using WSL 2 on Windows 10. My working directory is on Windows (e.g., C:/dev/foo) and in WSL it's /mnt/c/dev/foo.