Sticky Kit with React
rallyinteractive opened this issue · comments
I'm trying to use Sticky Kit with react but running into "Window is not defined" error when I run my app. Is there a way to work around this or a fix for this that I have not been able to find? I've tried a few different things but with no luck. Any help with this issue would be greatly appreciated.
You have to add something like this to your webpack config:
{ test: /\.js$/, include: [ path.join(__dirname, 'node_modules', 'sticky-kit') ], loader: 'imports-loader?jQuery=jquery,$=jquery,window=>global&window.jQuery=jquery,this=>window,define=>false' }