benwiley4000 / cassette

📼 A flexible media player component library for React that requires no up-front config
https://benwiley4000.github.io/cassette/styleguide
MIT License
185 stars 28 forks source link

SSR "window is not defined" #300

Closed danielr18 closed 5 years ago

danielr18 commented 5 years ago

This component is suffering the same Webpack problem as detailed over at webpack/webpack#6522 - when running in a server side render function there is a ReferenceError: window is not defined error.

Can be solved by setting globalObject:(typeof self !== 'undefined' ? self : this)` in the webpack config, I tried it with a local build and it's working well