jasonkuhrt / react-popover

A smart popover component for React
600 stars 253 forks source link

Changed const to var #158

Closed eran7789 closed 4 years ago

eran7789 commented 6 years ago

This is for support in IE 10 which does not support the const keyword, and since react-popover will usually be in node_modules it will not bundle correctly (hence with var instead of const) even with babel or similar.

jasonkuhrt commented 6 years ago

@eran7789 Thanks for bringing this up. Instead of changing the source code we should update the build configuration to do this for us. Can you rejig the PR to do that?

LoicGoyet commented 6 years ago

do we have any ideas about when this PR will be merged ?

jasonkuhrt commented 6 years ago

I'll try to get around to doing said rejigging myself, but meanwhile feel free to take a crack at it.

eran7789 commented 5 years ago

@jasonkuhrt the build only takes ./source directory and outputs it to ./build directory. The fix is in ./index.js file which is not touched by babel during the build. What do you propose here then? Why not just change this one require to a var instead of const? It totally makes since to keep it outside of the Babel transpiling process.

Maciekek commented 5 years ago

I found the same issue, I think we can/should merge it