mardi 23 décembre 2014

Why isn't meteor loading my compatibility scripts before Tracker.autorun?


I have a meteor project with a folder located at client/compatibility/ where I have some third party scripts. According to their docs:



This folder is for compatibility JavaScript libraries that rely on variables declared with var at the top level being exported as globals. Files in this directory are executed without being wrapped in a new variable scope. These files are executed before other client-side JavaScript files.



The problem is that when I try to access these global variables within the context of a Tracker.autorun function (located within a client/views folder), I get an error that whatever library I'm trying to call is undefined. Note that I can call these variables successfully anywhere else in my code except from within Tracker.autorun or Deps.autorun. So why aren't these compatibility files being executed prior?





Aucun commentaire:

Enregistrer un commentaire