-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register to globally available version of jQuery #360
Conversation
Thank you for contribution! How does this work on ES5 which is current normal? |
I had not verified this before. However, it seems the plugin does not work in CommonJS code as well. It works on the ES5 browser environment as it registers on the globally available CommonJS code: var jquery = require('jquery')
var jscrollpane = require("jscrollpane")
console.log(jquery.fn.jscrollpane, jscrollpane); Run Testcase: https://runkit.com/embed/5vp5rhyarvj7 |
Can you update to new release |
- Support plugin in ES6 modules
Sure! Updated to latest master. Also here is an updated testcase: https://runkit.com/embed/6bn0ostlytwz. PS: If everything looks fine, I can update the version number in |
One more thing as this is 'big' change I think we'll follow RC path so could you add this to rc1. Nobody can say I break their favorite tool. |
So would you update the version numbers (to include RC suffix) in the changelog as well? Just wanted to make sure my understanding is correct and there is nothing more on my plate. Thanks again for looking into this. |
Actually It would be easiest to remove Changelog or make it 2.2.1-rc.1 if you like to keep it. I'll make release after this as I can this make somebody unhappy. |
- Changelog would be updated on merge
Removed changelog. |
Merged thanks! |
I am not entirely sure about the maintainers preferences here, but it seems importing the plugin in a ES6 environment has no effect.
Issue:
The plugin does not register on window.jquery OR to the locally available jQuery in the module.
Expectation
Sample code
Contents of main.js
Contents of /jquery-shim.js
The pull requests gives preference to the globally available jquery (if present) before using the private jquery dependency as a fallback