Skip to content
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

Sticky Kit with React #254

Open
rallyinteractive opened this issue Jan 2, 2018 · 1 comment
Open

Sticky Kit with React #254

rallyinteractive opened this issue Jan 2, 2018 · 1 comment

Comments

@rallyinteractive
Copy link

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.

@dim2k2006
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants