2.1.0 • Published 4 years ago
egg-watcher-chokidar v2.1.0
egg-watcher-chokidar
if you use some network file systems or other virtualization software, an use default watcher can't detected file change. you can use this plugin;
Install
$ npm i egg-watcher-chokidar --saveUsage
// {app_root}/config/plugin.js
exports.watcherChokidar = {
enable: true,
package: 'egg-watcher-chokidar',
};if you just want use it in local evniroment, you just add this config to ${app_root}/config/plugin.local.js file
Configuration
This plugin used chokidar and you can pass chokidar options as following.
// {app_root}/config/config.default.js
exports.watcherChokidar = {
usePolling: true,
alwaysStat: true,
};see https://github.com/paulmillr/chokidar#api for more detail.
Questions & Suggestions
Please open an issue here.