souporserious / react-view-pager

Slider/Carousel powered by React Motion.
http://souporserious.github.io/react-view-pager/
MIT License
293 stars 46 forks source link

ResizeObserver is not constructor #48

Closed primozs closed 7 years ago

primozs commented 7 years ago

In Pager.js this should be like this: Note .default

if (isWindowDefined && !window.ResizeObserver) {
  window.ResizeObserver = require('resize-observer-polyfill').default;
}

Or it should be build with this. I think. https://github.com/59naga/babel-plugin-add-module-exports Cheers

primozs commented 7 years ago

Hm, It seams I have an issue when I build this with webpack2.

souporserious commented 7 years ago

Sorry about that, had some hiccups switching to using a ResizeObserver. Should be fixed here https://github.com/souporserious/react-view-pager/commit/586eb9a2d64a35931c5774a37b2ab7da4f4d3885 and is out in the latest prerelease. Please feel free to re-open this if it doesn't fix your issue.

primozs commented 7 years ago

Thx, this is really nice component! Cheers