javascript - Making Meteor to exclude certain JS files for anonymous users -
what best approach when there's need to:
- deploy meteor.js app meteor.com and
- exclude js files being bundled , accessed anonymous users
so far i've understood possible via placing files in question in public folder , conditionally loading them.
is there possibility, namely 1 allow keeping files needed loaded conditionally in client/templates.
thanks much!
jussi
meteor intends send code client in it's build bundle. being said, public , conditionally apply method works, or can write code allows functions ran people logged in. if you're using meteor accounts package, that's simple as
if(meteor.user){ //logged in } else { //not logged in }
Comments
Post a Comment