Meteor Npm-module client-side?

前端 未结 4 671
情书的邮戳
情书的邮戳 2020-12-14 20:10

Is it possible to use Npm-Modules on client-side?

More specifically:

I want to use node.js built-in crypto-module for encrypting a password the

4条回答
  •  猫巷女王i
    2020-12-14 20:44

    Its not possible to use Npm modules on the client side since Npm modules are extensions via node.js which only runs on the server end.

    If you want to use a file like crypto you would have to make a client side only version and put it in /client/lib of your Meteor app

    While this may be possible officially, Meteor doesn't support this.

    You would have to include requirejs manually using this project: https://github.com/apendua/require

提交回复
热议问题