私は流星で新しいです。パッケージに moment.js を追加しません。しかし、レンダリングされたページに moment.js が含まれていることがわかります。私が追加した他のパッケージにはmoment.jsが含まれていると思います。私の質問は、含まれている moment.js を使用できないことです。moment.js を使おうとすると Meteor が言いException in template helper: ReferenceError: moment is not defined
ます。何が問題なのですか?
J:
Template.Home.helpers({
fromnow: function(time){
console.log(time);
return moment(time).fromNow();
}
});