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
I'm using CanJS in a Browserify application and noticed the scope jQuery plugin is not defined.
This happens because can.Component checks if window.$ is defined before adding the plugin but in a CommonJS environment, jQuery does not add $ to window.
I thought the solution was to not do this at all and, instead, have the check for jQuery abstracted from can.component. Or are you saying to use can.$.fn in the mean time?
Basically, we shouldn't be checking for jQuery. If can.$ is an interface to the underlying library's nodeList. Perhaps can.$.fn should be its interface to adding additional methods to it.
I'm using CanJS in a Browserify application and noticed the scope jQuery plugin is not defined.
This happens because can.Component checks if
window.$
is defined before adding the plugin but in a CommonJS environment, jQuery does not add$
towindow
.I think a much safer check would be
window.jQuery
since that always seems to be exposed.The text was updated successfully, but these errors were encountered: