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
In Node.js, require('jquery') will instead return a jQuery factory that requires a window, thus jquery.hammer.js breaks, as it expects jQuery to be loaded.
We test our GUI on Node.js with jsdom and we'd like this to work.
It also doesn't make much sense to depend on jQuery. This makes you bring your own version of jQuery, bloating the size of a Browserify bundle. It also attaches your plugin to your copy of jQuery, as opposed to a version of jQuery our code is using.
It is much better to use peer dependencies to hint what jQuery you need,
and then take window or jQuery as a parameter or at least rely on jQuery as a global.
Would you be open to big API changes in your module to fix these problems?
It may force you to bump the major version again, but otherwise this module is currently unusable in Node.js and with Browserify, in my opinion.
The text was updated successfully, but these errors were encountered:
In Node.js,
require('jquery')
will instead return a jQuery factory that requires a window, thus jquery.hammer.js breaks, as it expects jQuery to be loaded.We test our GUI on Node.js with jsdom and we'd like this to work.
It also doesn't make much sense to depend on jQuery. This makes you bring your own version of jQuery, bloating the size of a Browserify bundle. It also attaches your plugin to your copy of jQuery, as opposed to a version of jQuery our code is using.
It is much better to use peer dependencies to hint what jQuery you need,
and then take window or jQuery as a parameter or at least rely on jQuery as a global.
Would you be open to big API changes in your module to fix these problems?
It may force you to bump the major version again, but otherwise this module is currently unusable in Node.js and with Browserify, in my opinion.
The text was updated successfully, but these errors were encountered: