-
Notifications
You must be signed in to change notification settings - Fork 7
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
IFFY wrong root context #13
Comments
@NeXTs Ok now I have the same problem as I'm migrating my project to webpack :( the |
I just copied the solution from jQuery, now it is gonna be working (typeof window !== "undefined" ? window : this, function (window) { |
I did test it in this code-style import duel from 'dueljs'
const ch = duel.channel('test') |
Cool! |
Nice @studentIvan 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using dueljs in a merged context (e.g. in a build pipeline merging all javascript files into one bundle (e.g. webpack)), the context will become (suprisingly!) empty object instead of window.
Because of this - plugin breaks during initialization at L425 saying
el
doesn't haveaddEventListener
methodUsing window instead of this resolves issue for me, although maybe there are better solution..
The text was updated successfully, but these errors were encountered: