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 just threw jquip into my system instead of jQuery...and straight away saw a problem:
;$['plug']("ajax", function ($) {
This line throws an "$.plug is not defined" error. The entire code is wrapped in these lines:
/* 2 *//***/function(module,exports,__webpack_require__){/* WEBPACK VAR INJECTION */(function($){// ... snip. Jquip goes in here./* WEBPACK VAR INJECTION */}.call(exports,__webpack_require__(2)))/***/},
The __webpack_require__(2) resolves to that very module. This can, but does not have to, happen. A solution would be to replace first or second line of jquip with this:
A local reference to the object that we are building. Previously polluted $'s will be shaddowed by this one.
We can figure out if we have module.exports present and return jquip this way, too.
At the start or end of jquip:
if(typeofmodule!="undefined"&&typeofexports!="undefined"){// "return" the jquip instance.exports=$;}
I am not very familiar with AMD, but the first 20 lines of jQuery show a good example on how to go about them.
For now I have to fall back to jQuery, since there is no appearant way I can monkeypatch this problem out without having to fork this project ... for one line, at most.
The text was updated successfully, but these errors were encountered:
I just threw jquip into my system instead of jQuery...and straight away saw a problem:
This line throws an "$.plug is not defined" error. The entire code is wrapped in these lines:
The
__webpack_require__(2)
resolves to that very module. This can, but does not have to, happen. A solution would be to replace first or second line of jquip with this:This way, we gain these things:
module.exports
present and return jquip this way, too.At the start or end of jquip:
I am not very familiar with AMD, but the first 20 lines of jQuery show a good example on how to go about them.
For now I have to fall back to jQuery, since there is no appearant way I can monkeypatch this problem out without having to fork this project ... for one line, at most.
The text was updated successfully, but these errors were encountered: