Open awatson1978 opened 6 years ago
Hm, but I just have echo "package" > .meteor/packages
in my build process and it works well. I do not see much difference between this and --extra-packages
?
Because .meteor/packages
is then modified on disk. Not everyone uses the build pipeline on the server where it's eventually run. Adding packages directly to .meteor/packages
only works if the destination isn't reused for other things. If you're building desktop apps or checking in the bundled code into a git based deployment pipeline (Azure, I'm looking at you), then your build process is probably going to be on the development machine, not the destination server. In which case adding that extra package will change dependencies, and require removing before you can get back to development.
I tend to always build things from scratch, clone, modify what I have to do (like packages), build, deploy, erase. Do you really want to modify things locally you care about? This could also mean you build and deploy with some other custom stuff you have added by accident.
Well, that's exactly why we're requesting this feature. Lacking the --extra-packages
command on meteor build
is precisely what requires us to modify the baseline app instead of loading things at runtime.
To be fair, it's a feature that primarily benefits package-only apps that have some sort of plugin architecture that are mature enough to be in production. But we're hardly the only ones with that kind of setup. RocketChat, Crater.io, and others all use the same architecture.
That being said, it's also the logical extension of the --extra-packages
command pattern. If it's supported in the regular meteor run
command, it should also be supported with meteor build
.
This is a good idea, and I think the proper CLI UI is already dictated by how it works with other commands, so this is a great opportunity for a PR. It will require a new Meteor release, since it’s part of meteor-tool
, though.
I'll put a pull request together with the functionality. Probably won't get to it until October though.
Description of the Problem
Meteor supports the
--extra-packages
argument, which is fantastic and provides a lot of flexibility for apps that have a plugin architecture or package-only apps. This functionality doesn't extend to production build pipeline, however. So, when incorporating--extra-packages
into your workflow, it works great until you actually need to deploy to a production or to a continuous integration environment. Then, all of a sudden, one is back tometeor add/remove
, which can mess up package dependencies.Suggest Solution
Add
--extra-packages
argument to themeteor build
command, so it's part of the production pipeline.