-
Notifications
You must be signed in to change notification settings - Fork 236
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
Node.js - Adding module.exports #124
Comments
Hello @DevelGitH, I know how |
Hi @eisbehr- , The problem is when i`m trying to import your lazy-load script, it throws an error at the line 43 of the file jquery.lazy.js ( My Code is the following:
|
I will keep this open as an enhancement. But I need to think about the implementation. |
Hi,
copied file to lib folder and tried:
these solutions doesn't work for me, I get this error:
How can I import library to my project? |
The error sounds like you didn't added |
I've used the same import approach as if the first comment:
|
Do you know that this is an issue and it is still open? Why do you think it will work for you, if it would not work for others?! |
The only solution that I found was pasting import statements on top of the jquery.lazy.js file:
Now it works for me and hope will work for others. |
Yeah but that solution wouldn't be nice. The jquery library will now be imported twice, when the developer is using the library in his project. Have a look at other libraries, they aren't importing the required libs in their project. |
Yes, I know that problem. In the new version of Lazy the import problem is solved and there is no dependency on jQuery anymore. But I can't actually tell when the release will be ready. I think I will publish the first draft within the next time. |
Unfortunately this is still an issue. Any news on the new version? |
Please use in your library the function module.exports to allow requiring the module with the es6 command "import"
http://stackabuse.com/how-to-use-module-exports-in-node-js/
The text was updated successfully, but these errors were encountered: