EMHmark7
EMHmark7

Reputation: 87

In meteorjs, where should I declare a function, so calls to it work from anywhere?

And if this function needs other libraries declared before it? (such as bootstrap, less, paperjs)

In other words, how can I control the import order?

Upvotes: 0

Views: 37

Answers (2)

Luke
Luke

Reputation: 5708

If the function needs access to the DOM, put it in client/lib

else, put it in /lib

DOCS

Upvotes: 0

halbgut
halbgut

Reputation: 2386

Packages always load first, so you can simply define them inside /lib/*.

Check the docs for more info.

Upvotes: 2

Related Questions