sticky-kit icon indicating copy to clipboard operation
sticky-kit copied to clipboard

Sticky Kit with React

Open rallyinteractive opened this issue 7 years ago • 1 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.

rallyinteractive avatar Jan 02 '18 23:01 rallyinteractive

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' }

dim2k2006 avatar Dec 18 '18 11:12 dim2k2006