jquery-browserify icon indicating copy to clipboard operation
jquery-browserify copied to clipboard

jQuery leaking to window.$

Open TimBeyer opened this issue 12 years ago • 2 comments

When running jQuery with browserify, loading it using require('jquery-browserify'), jQuery still installs itself in the global window object as window.$ and window.jQuery. This should not happen automatically. The whole point of having require available is that we can get rid of libraries in the global scope.

It also prevents conflicts with other libraries that use jquery.

TimBeyer avatar Oct 24 '13 14:10 TimBeyer

Absolutely. This defeats the purpose of this library.

dwradcliffe avatar Feb 17 '14 02:02 dwradcliffe

I'd recommend using https://github.com/kirbysayshi/node-ddd-jquery instead. It doesn't leak and actually only packages what you really need.

TimBeyer avatar Mar 18 '14 12:03 TimBeyer