-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
How to use ifvisible with webpack #29
Comments
when used with webpack like build system ifvisible will not be global. You would have to require it and user the variable. Example var ifvisible = require('ifvisible.js');
ifvisible.on('idle', function(){
...
}) You might need to install ifvisible through npm if you installed ifvisible in a different way you need to require it from it position such as Hope that clears it up |
I got a smilar issue with webpack. My library that I try to pack via webpack contains ifvisible.js. For some unknown reason the module cannot be resolved - I have to add another alias for ifvisible and ifvisible.js - if I had to guess: a namespace thing in your AMD pattern is wrong. Module not found: Error: Cannot resolve module 'ifvisible' |
Working on V2 at the moment. it will clear all of these issues. |
Great! |
Checkout my comment on #38 any help is appreciated. |
I am unable to understand how does ifvisible initialisation code works. Even if i include it in webpack entry point, i cannot find a global ifvisible object in my namespace. Any help would be really appreciated.
The text was updated successfully, but these errors were encountered: