-
Notifications
You must be signed in to change notification settings - Fork 311
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
Importing using ES6 but jQuery is loaded externally #132
Comments
Seems like a bug. I'll take a closer look. |
@dobromir-hristov I fixed that problem by marking |
@kottenator And I'm having no problem with |
|
@andreiglingeanu - I think I've found a bug in the UMD template I'm using (this line should assign a value, not a function). I'll take care. |
So, after investigation, it's not a UMD bug but rather UMD specific decision. They decided to export a factory function, not import jcp from 'jquery-circle-progress';
jcp(); I find this decision too complicated, so I've updated the UMD code. Now this will work (as expected): import 'jquery-circle-progress';
// that's it, plugin is initiated using `$ = require('jquery')` I'm releasing version |
Now few words about I believe the bug is fixed. I'm closing this ticket. @dobromir-hristov - please, check if everything works now. Feel free to reopen this ticket. |
Ok so my situation is a bit sticky. I am developing a WordPress theme for a client, but I am using ES6 with Babel and Browserify for my custom code. Problem is I cant just deregister jQuery because the majority of WP plugins require it.
So in every ES6 module I just
const $ = window.jQuery
(because I just couldn't make browserify shim to work properly).But now when I
import 'jquery-circle-progress'
I jsut get that circleProgress is not a function of jQuery. Any suggestions how I should proceed ?At this point I just added the whole plugin into my Libraries JS stack, and its available everywhere, but that's not cool.
The text was updated successfully, but these errors were encountered: