JakeSidSmith / react-reorder

Drag & drop, touch enabled, reorderable / sortable list, React component
https://jakesidsmith.github.io/react-reorder/
MIT License
218 stars 58 forks source link

var root = this || window; causes compile error #67

Closed rmoylan closed 8 years ago

rmoylan commented 8 years ago

This is causing a window is not defined error on line 459. I am using it in a universal web app. I removed the reference to window, and all seems to be fine. Has anyone else ran into this issue?

JakeSidSmith commented 8 years ago

What are you compiling with?

rmoylan commented 8 years ago

importing using es6 with babel, and webpack for module bundling/compiling.

JakeSidSmith commented 8 years ago

OK, thanks for bringing this to my attention. Not had much experience with webpack myself, but I'll take a look.

Could you post your npm build script and or webpack configuration?

rmoylan commented 8 years ago

That would probably be a lot. But, I am using the rern starter at https://github.com/pthm/rern-starter . It is a port of the mern starter kit. You could pull that down and run tests off that. I forked the library, and i'll see if I can figure anything out too.

JakeSidSmith commented 8 years ago

Kk, I'll setup a project using that when I've got some free time. Seems like an odd error to be getting. No idea off the top of my head, what'd cause that problem.

HriBB commented 8 years ago

@JakeSidSmith please review #68 and let me know if it's OK ;)

JakeSidSmith commented 8 years ago

Fixed in #68 and released as 2.1.0