Skip to content
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

the 8.13.0 version will report a error #230

Closed
fakership opened this issue Aug 6, 2018 · 13 comments
Closed

the 8.13.0 version will report a error #230

fakership opened this issue Aug 6, 2018 · 13 comments

Comments

@fakership
Copy link

image

It seems that the export object is not a function

@fakership
Copy link
Author

when i take it back to 8.7.0, it will work!

@l3aconator
Copy link

l3aconator commented Aug 6, 2018

I am getting this on the latest version too, works when the code isn't run through minifier

@verlok
Copy link
Owner

verlok commented Aug 6, 2018

Hey guys, thank you for reporting this.
I'm afraid I need more information to help you.
Please tell me how you include LazyLoad (npm install? CDN script?) and how you use it.
Show me the code and I will be able to understand what happens.

@verlok
Copy link
Owner

verlok commented Aug 6, 2018

Just to let you know, in version 8.13 and 10.13 I changed the content of the es2015.js file.
It used to be wrapped in UMD (Universal Module Definition), whereas now it's just a regular ES module.

@fakership
Copy link
Author

fakership commented Aug 7, 2018

I include LazyLoad by (npm install):

import LazyLoad from 'vanilla-lazyload';

This is the usage:

new LazyLoad({})

The lazyload.min.js will report a error;

@verlok
Copy link
Owner

verlok commented Aug 7, 2018

Hey @fakership,
thanks for reporting it. I'll definitely check and get back to you.

@verlok
Copy link
Owner

verlok commented Aug 7, 2018

Hey @fakership,

I've created this GitHub test repo in which I call LazyLoad as an ES2015 module, and everything works as expected.

So I think the problem might be related to something else you are using to bundle or minify your code.

What are you using? WebPack 4? Rollup.js? Babel is included in the mix?

Please share more information so I can investigate more.
Thanks

@verlok
Copy link
Owner

verlok commented Aug 8, 2018

I was able to reproduce the bug using WebPack to bundle LazyLoad in this test repo.
https://github.com/verlok/lazyload-es2015-webpack-test
Now I'm going to fix it. I'm sure it's just a matter of webpack configuration.

@fakership
Copy link
Author

yes, I bundle LazyLoad by webpack4.

@verlok
Copy link
Owner

verlok commented Aug 8, 2018

I found the issue. It was a mistake in my package.json

@massic80
Copy link

massic80 commented Aug 8, 2018

Thanks!
I just found the trouble in my project, and the latest working release was the 8.12.
Looking forward for the 8.15 ;)

@verlok
Copy link
Owner

verlok commented Aug 8, 2018

Just released 8.15.0 and 10.15.0 on npm.
The issue should be fixed now. Let me know!

@verlok
Copy link
Owner

verlok commented Aug 8, 2018

I've tested it in this repo and checked that now it works correctly.

Thank you @fakership and @massic80 and @l3aconator for reporting your issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants