The question:
How do I load a package in development but not production?
The context:
The package hot-code-push
is included as part of meteor-base
, and is very useful in the development environment (it automatically reloads your page when it detects changes).
On my production app, I have this automatic reload disabled using the following code:
if (Meteor.isProduction) {
Reload._onMigrate(function() {
return [false]
})
}
The above works, however the package is still included as part of the Meteor bundle, and one of my top subscriptions is for meteor_autoupdate_clientVersions
per screenshot below:
My understanding is that this subscription is directly linked to the hot-code-push
package, and that if I remove it on production, it will disappear.
The question again:
To re-iterate the question: how do I selectively load a package in development, but not in production? Not sure it’s possible from my .meteor/packages
file.