RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 94 forks source link

Bug: Generator functions result in a syntax error in IE11 #96

Open Blackskyliner opened 4 years ago

Blackskyliner commented 4 years ago

In regards to RocketChat/Rocket.Chat.Livechat#180 and a lookup at the current definition at https://github.com/RocketChat/Rocket.Chat.Livechat/blob/dev/package.json#L111

It seems as it is at least intended to support IE11, as far as the current browserlist definition goes.

Since the update to the latest Rocket.Chat Version, which features this new Widget, some customers of maintained sites are not able to use the Chat functionality because it is broken in IE11.

So will there be an official statement in the near future, if IE11 will be supported or not? Maybe this problem could be solved by minor changes to the codebase and/or babel preset?

I would also like to see IE11 die already, but reality is that many institutions, especially rural ones, in many countries will have and use the IE11 shipped with their operating system or as ruled by their administrators or policies. So support for the latest IE version (11) should be mandatory for widespread acceptance/usage of this software.

Also to mention, that the old widget used to just worked with IE11 and the new one does not, which may prevent some from upgrading to the latest version of Rocket.Chat because support for that old browser is missing within the shipped Livechat widget.


SCRIPT1005: Exptected '('
Rocket.Chat.js.SDK.chunk.27bc4.js (1,2193)

SCRIPT1005: Expected '('
vendor.chunk.8bd3b.js (1,255383)

The related lines feature a generator function. I guess IE11 does not have Generator functions and we would need to Polyfill them through babel e.g. @babel/plugin-transform-regenerator

tassoevan commented 4 years ago

Hmm, I believe the issue lies in Rocket.Chat SDK, since our Webpack/Babel configuration excludes node_modules. As you can see here the widget must support IE11, therefore this is a bug.