I’m trying to make NPM package for Meteor 1.3. Everything is OK except one small issue: how to execute code server side from the package?
If I simply add:
console.log(Meteor.isServer);
It executes automatically when app is started at client (properly returning false), but it doesn’t execute automatically at server. Of course, I can create function and call it from my applications server code, but I want code to execute automatically when server starts - for example, I want to execute Meteor.publish in a package.
You can just do import 'my-npm-package' to avoid the random export. but I am unsure if you are saying that meteor is doing some weird stuff in trying to figure ou tif should automatically run code or not.