You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, the factory function only receives the module/script name. If we inject the dependencies, as well, devs can solve more compatibility problems. For instance, some libraries don't export a global var when they detect and AMD define(). This prevents a legacy script from importing the library. Case in point: jquery.flot.time.js uses timezoneJS.
If flot.js's legacy config looked like the following, we could make this work:
The text was updated successfully, but these errors were encountered:
unscriptable
changed the title
Inject legacy deps into legacy factory function
Inject configured dependencies into legacy factory function
Jun 16, 2014
As a complement, this it the declaration of the corresponding lib (and its definition as AMD module), timezoneJS, where we can see timezoneJS not being attached to root when AMD is detected. (Much kudos to @unscriptable for helping me figuring out what happened)
At the moment, the factory function only receives the module/script name. If we inject the dependencies, as well, devs can solve more compatibility problems. For instance, some libraries don't export a global var when they detect and AMD
define()
. This prevents a legacy script from importing the library. Case in point: jquery.flot.time.js uses timezoneJS.If flot.js's legacy config looked like the following, we could make this work:
Feels kinda hackish. :(
The text was updated successfully, but these errors were encountered: