I have been trying to work this out for a long time and see all the threads asking similar questions are unanswered so I’ll give it a shot asking myself.
When meteor builds, then I deploy it on my server, only some images in the public folder are available. Is this related to how they are referenced in the html files themselves? The ones referenced in html files show up just fine but the ones not referenced anywhere are not available. And they all show up on my local dev env.
Such as the file in my public directory: site.webmanifest references files sitting in the same public directory but they are not able to be seen but the file itself is.
How can this be? Where is this explained in more detail?
I know deploying meteor is one of the only really hard parts of meteor, I really wish it was documented/detailed more for self deploying without galaxy or another helper.
(trying both ways to reference to see if anything would work)
the images are both in public/images. I can’t even manually load the favicon images if I type the url into the browser, or any method. These are both in html files, one is obviously the head, the other is just a random page.
Have a look at Meteor-up it makes deployment really easy.
I don’t know the exact details, but presumably the unused assets in /public are not put in the bundle. You would probably want this behaviour, as it will reduce the bundle size. If you really want to make sure they go up, you can create a page that references them, even if that page never gets displayed.
The intention is not to not learn how it works and use mup bit instead have a more clear understanding how a very critical part of the build phase occurs.
I was able to make it work by adjusting nginx to point to the nested directories but I am still unable to get anyone that seemingly knows in depth how the build stage works.
You can find the manifest from the app run in development at .meteor\local\build\programs\web.browser\program.json. I would start by comparing it with the one created when deploying to make sure they both have the missing public files. If they both have the missing files, the problem might be in the server code instead of Meteor’s build process.