Hi! There’s something I don’t understand about module imports. I thought I did, but apparently, I was wrong. Since Meteor 1.7, the imports
directory is supposed to have become unnecessary when specifying explicit entry points for client and server. Here’s what I added to package.json
:
"meteor": {
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
}
}
From what I understand, this setup would ensure that only files explicitely imported on the server would trigger a server restart, right? It works if I modify files that are nested in a client
directory somewhere, but I just realized that modifying a file in any other directory, even though it is not used anywhere in server-side code, triggers a server restart.
Just as an example, if I create a new file at the root of the directory (which server should know nothing about), each time I modify it, the server restarts. Why is that?