I have created a custom compiler hook that modifys the file system in my code. This triggers a recompilation, which triggers my hook, which triggers a recompilation, and so on and so forth.
I added the file that gets modified into my ignore options in my config, but that did not work. If it did work I would still like to watch those files for changes so I can trigger the compilation again.
I figured if I run this command with the beforeRun hook, it won't cause a recompile, but I think I have a misunderstanding of how this is working.
{
apply: compiler => {
compiler.hooks.beforeRun.tap('RunMyPlugin', () => {
exec('yarn run myCommand', (err, stdout, stderr) => {
if (stdout) process.stdout.write(stdout);
if (stderr) process.stderr.write(stderr);
});
});
},
},