Closed funkyfuture closed 6 years ago
Can you do a simple console.log(basicLightbox)
? Would be interesting to see what it contains.
Are you minifying your code afterwards? Maybe the error occurs because of the double-minification (it shouldn't, but it's possible). Can you try it with your minification turned off?
i use the dist.basicLightbox.min.js and the log says Symbol(Symbol.toStringTag): "Module"
.
This isn't saying me anything, but it could be because you're rebundling everything and the minified version is already bundled. I would recommend to stay with unminified source. Let me know if you find out more.
because you're rebundling everything
no, i'm still too fresh and incompetent in Javascript to figure out how to do this. might the error evoke because i have type="module"
specified in the embedding script
tag?
Could be, but I haven't used type="module"
, yet. I will keep the issue open, but can't provide a solution. Maybe someone else has the same issue and hopefully knows what's going on.
Closing this issue because I can't provide a solution.
in my javascript file i import basicLightbox with
import * as basicLightbox from './basicLightbox.js';
, however when i have the minified version in place there, i get anUncaught TypeError: basicLightbox.create is not a function
where i callbasicLightbox.create
. with the plain source it works just fine.