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

Not working with webpack Encore #169

Open
etshy opened this issue Jun 18, 2018 · 1 comment
Open

Not working with webpack Encore #169

etshy opened this issue Jun 18, 2018 · 1 comment

Comments

@etshy
Copy link

etshy commented Jun 18, 2018

I got this error after webpackEncore compilation

Uncaught ReferenceError: Blazy is not defined
    at HTMLDocument.<anonymous> (reader_init.js:215)
    at mightThrow (jquery.js:3534)
    at process (jquery.js:3602)
@cjhaas
Copy link

cjhaas commented Jul 22, 2019

When you import through webpack, blazy is used as a module and not bound to the global window object. So in your code you need to also import it using something like:

import Blazy from '../node_modules/blazy/blazy';

This will then give you access to use Blazy as a constructor

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

2 participants