How to exclude files from meteor build?

My app contains an outside-facing landing page that serves as a website. This page contains some videos and is quite heavy. For testing purposes, I am placing these videos under the public folder. On the prod system, however, they are referenced from S3 instead.

Now I would like to exclude these files from the Meteor build (I’m using mup) to deploy. Otherwise, the app takes ages to upload, unless I remove the videos every-time I want to mup deploy. Even worse, I noticed that the bundle includes them twice, under web.browser and web.browser.legacy.

Is there a way to exclude the files from build, but keep them in place for local testing? The undocumented .meteorignore file does not work for the public folder, unfortunately.

Hi @waldgeist,

I dont have a solution for exactly what you want to do, but I can suggest a workaround. What we are doing is to create a bash script that moves whatever we need to remove from the bundle when building and after deploy we move the files back to their place.

I think mup has pre and post deploy hooks, but you can also achieve that with npm scripts.

We have been using that method for a while and it works with out any problems.

Hope this helps.