Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

meteor build --extra-packages #316

Open
awatson1978 opened this issue Jul 20, 2018 · 6 comments
Open

meteor build --extra-packages #316

awatson1978 opened this issue Jul 20, 2018 · 6 comments

Comments

@awatson1978
Copy link

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 to meteor add/remove, which can mess up package dependencies.

Suggest Solution
Add --extra-packages argument to the meteor build command, so it's part of the production pipeline.

@mitar
Copy link

mitar commented Jul 20, 2018

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?

@awatson1978
Copy link
Author

awatson1978 commented Jul 20, 2018

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.

@mitar
Copy link

mitar commented Jul 20, 2018

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.

@awatson1978
Copy link
Author

awatson1978 commented Jul 25, 2018

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.

@benjamn
Copy link
Contributor

benjamn commented Aug 15, 2018

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.

@awatson1978
Copy link
Author

I'll put a pull request together with the functionality. Probably won't get to it until October though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants