I have a Meteor 1.4.1 app, it’s fully build with meteor packages, each of them having a main module for both client and server.
If I edit any client file, the entire server restarts (instead of just updating the client). So I’m suspecting this is either a meteor bug (but I can’t seem to create a small reproduction) or somewhere in the import tree I’m importing a client file on my server, and this causes the entire server to restart.
Since I can’t seem to create a small reproduction, I’m suspecting it’s the latter problem. However, I can’t seem to locate where the wrong import would be.
Is there a way to know why a file change causes a server restart? I mean, I could probably debug meteor-tool to find out this information, but meteor-tool is quite complex and I don’t know where to start looking…
So I suspect that somewhere in the import path of a server/main.js file, there is an import of a top-level client file which causes any client file change to trigger a server restart.
But then again, my entire client is written in angular 1, which would give errors if I imported it on the server (like window is not defined or something like that).