jl-/react-slide-deck

Server Side Render

educostachaves opened this issue · 1 comments

Hello,

I'm trying to use your lib on server-side. But I taked this error:

[piping] error given was: ReferenceError: window is not defined
[2]     at eval (webpack:///../~/react-slide-deck/dist/deck.js?:1502:31)
[2]     at eval (webpack:///../~/react-slide-deck/dist/deck.js?:1497:48)
[2]     at module.exports (webpack:///../~/react-slide-deck/dist/deck.js?:1519:69)
[2]     at Object.eval (webpack:///../~/react-slide-deck/dist/deck.js?:1400:38)
[2]     at __webpack_require__ (webpack:///../~/react-slide-deck/dist/deck.js?:30:30)
[2]     at Object.module.exports (webpack:///../~/react-slide-deck/dist/deck.js?:123:19)
[2]     at __webpack_require__ (webpack:///../~/react-slide-deck/dist/deck.js?:30:30)
[2]     at Object.defineProperty.value (webpack:///../~/react-slide-deck/dist/deck.js?:50:18)
[2]     at eval (webpack:///../~/react-slide-deck/dist/deck.js?:53:10)
[2]     at webpackUniversalModuleDefinition (webpack:///../~/react-slide-deck/dist/deck.js?:3:20)

I don't know if that's simple to be solved, or if this error is happening due to be server-side. Or I forgot something...

jl- commented

@educostachaves For a quick reply, it works fine on my server render case.. Is it possible that your webpack.conf.js might be the cause? I'm not sure if the window would cause this error? the functions referencing it execute only on client side(browser). Let me know what else I could help. Good Luck!