[feature request] avoid restarting Meteor server when changing public/ files

Right now I have all of my client-side code in the public/ folder, running as plain JS. This is nice because I don’t have to worry about Meteor’s build system getting in the way. The code I write, is the code I get on the client, plain and simple, using native browser ES Modules.

However, every time I update code in the public/ folder, the server has to do a lengthy restart to copy over the update public/ folder so it can be served from the build inside .meteor/local.

It’d be great if updating the public folder did not require a full server restart. The file could simply be copied to the destination folder. Node Express or any Node.js static file server will simply serve new files that are placed into the served folder any time, dynamically, without a restart, so I believe we don’t need the Meteor app to be restarted on every change of public/ files.

Side thought: we already have the forums here, so it seems redundant to have feature requests on GitHub Discussions. A “feature request” category could easily be added here. Discourse has excellent plugins for thread voting too, so that threads can be sorted by most votes.

Uhhhh did you try .meteorignore?

@harry97 ignore the public/ folder? Trying now…

(btw the current Meteor docs are missing any mention of .meteorignore)

@harry97 ignore the public/ folder? Trying now…

I mean that’s one way to try to solve the problem but I was thinking that since you purposefully put your files inside of /public to escape the build system why not place them inside some other folder and then use .meteorignore? There’re multiple ways to skin the cat but I’m not the one to judge.

(btw the current Meteor docs are missing any mention of .meteorignore)

Yeah the docs situation is pretty horrible :cry:

I put public/ in .meteorignore, and changing any files in there still make the server restart.

But even if that made meteor ignore the files, I still need to see updated files in the client, so that doesn’t seem like it would be what I need.

And if I place them in a folder outside of public/ then the client can no longer fetch them, and I need the client to fetch them.

An idea is maybe I can make my own “public” folder outside of public/. I should be able to use the Meteor.connectHandlers to add the static serve logic. But the problem with this is then I will need to make a Meteor build plugin to ensure that these files go into the app build. That would be quite a bit of work.