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;
$ npm i egg-watcher-chokidar --save
// {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
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.
Please open an issue here.