1、使用客户端的库,如moment.min.js库,在根文件夹下建lib文件夹,放到里边,meteor默认先加载lib中的文件。
Yes, it is possible. You can use an npm module in Meteor, since it's based on Node.js.
This code has worked for me fine, e.g.:
var fs = __meteor_bootstrap__.require('fs');
UPDATE: To install an npm module in a Meteor app
- Inside your terminal, change path to your Meteor app directory.
> cd .meteor/local/build/server
- Install an npm module like so
> npm install module_name
.