Closed tal-rofe closed 1 year ago
I use something like this:
class WatchExternalFilesPlugin {
apply(compiler) {
compiler.hooks.afterCompile.tapAsync(
'WatchExternalFilesPlugin',
(compilation, callback) => {
[
path.join(__dirname, 'your-directory-of-interest'),
].forEach(path => compilation.contextDependencies.add(path));
callback();
});
}
}
Along with a webpackConfig.plugins.push(new WatchExternalFilesPlugin());
call in my craco.config.js
As I changed to other package, this issue is no longer relevant to me.
I want CRACO to watch specific package changes (as it is a private package in my monorepo environment..). So I configured craco:
I guess you should only relate to
devServer
key. But when I try to run CRACO I get: