简体   繁体   中英

Using npm modules in Meteor Angular 1.3

This seems like a dumb question but I remain confused. Supposedly meteor has built in support for npm modules in 1.3 .

I am using Meteor with Angular integration. On the tutorial it seems that using npm modules should be as simple as:

  1. installing the npm package into the meteor root folder

And

  1. importing them into the file in the form import name from 'name' .

This however does not seem to be working for me.

The reason why you can think:

does not seem to be working for me

may be the fact that not all packages produce default export as MasterAM mentioned.

For packages, that do not support default export you can use: import 'name' to get your module loaded globally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM