Hi,
How can we know which modified file triggers the restart of Meteor in development via the watcher?
Thanks.
Hi,
How can we know which modified file triggers the restart of Meteor in development via the watcher?
Thanks.
Do you mean when working on a Meteor-Rspack app?
Adding the following to your rspack.config.js helps with that.
plugins: [
{
apply(compiler) {
compiler.hooks.watchRun.tap('WatchRun', (comp) => {
if (comp.modifiedFiles && comp.modifiedFiles.size > 0) {
console.log('\n๐ Files changed:', [...comp.modifiedFiles].join(', '));
}
if (comp.removedFiles && comp.removedFiles.size > 0) {
console.log('๐๏ธ Files removed:', [...comp.removedFiles].join(', '));
}
});
},
},
],
If the change comes from the Meteor bundler, for example when not using Rspack or when modifying an atmosphere package, we donโt have that level of verbosity in the Meteor bundler. But this is something we can add, so that enabling modern.verbose=true shows it.
Why do you need to know this?
Yes, with Meteor 3.4 (Meteor-rspack). I should have specified that.
I am just playing with playwright and Meteor restarts when I run my tests. I have placed files in .meteorignore, but the restart persists. So I am trying to determine which file(s) trigger this restart.