问题
when I try to require WOW
by one of those statements
global.WOW = require('wowjs');
var WOW = require('wowjs');
window.WOW = require('wowjs');
I receive this error
jQuery.Deferred exception: WOW is not a constructor TypeError: WOW is not a constructor
回答1:
try this one
const WOW = require('wowjs');
window.wow = new WOW.WOW({
live: false
});
window.wow.init();
回答2:
the module exports an object, you need to use the WOW constructor in that object. Eg. require('wowjs').WOW
来源:https://stackoverflow.com/questions/43392341/wow-is-not-a-constructor