i can’t resolve one problem. For example we use:
import LoginButtons from '../../modules/login-buttons';
to import some variables from module, but what if i want make module available without enter a path, just lick modules from npm:
import LoginButtons from 'login-buttons';
What should i do? Nothing from Node has helped, like create package.json and etc.
peter1
March 10, 2016, 2:00am
2
One way is to put them in a Meteor package. Assuming your package name is foo, and it exports an object called foo, you can then import them from anywhere with:
import foo from 'meteor/foo'
in node_modules/meteor?
What about naming n package.json, do i need create it? or use name like index? or i can keep my name like login-buttons.jsx?
thanks.