I included an old library that depends on jQuery. I am lucky enough that old widget do not touchwindow, but still it need access to variable jQuery. So I wrote following shim and make everything work.
No, there isn't a way to do that. browserify-shim tries to achieve maximum compatibility, even though that might expose some variables that don't need exposing.
I included an old library that depends on jQuery. I am lucky enough that old widget do not touch
window
, but still it need access to variablejQuery
. So I wrote following shim and make everything work.However now jQuery is attached to global namespace. This happens due following line in https://github.com/thlorenz/browserify-shim/blob/master/index.js#L62
I do not need jQuery to be global, is there a way to prevent this behaviour? I would need only following line to be prepended.