Closed m-lautenbach closed 8 years ago
Well that'a annoying.
Are you sure your IE11 isn't in compatibility mode?
Babel no longer transpiles Object.assign
. If you want to, you can make your own build:
https://babeljs.io/docs/plugins/transform-object-assign/.
Alternatively (and this is the recommended choice) you use the object.assign.shim()
from a couple years ago. That way your other packages (which I guarantee are also using Object.assign
) will be OK.
They don't, that's why we noticed it is done in redux-optimistic-ui
.
Probably because it's not supported by any IE version: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Browser_compatibility
This library broke our IE support. Would you consider changing that part?
a shim is definitely what you want then, either babel-polyfill
or the one listed above. By shimming inside the package, the package gets bigger, which means the folks who use something like babel-polyfill
are sending redundant bytes over the wire & there's no way they can avoid it. By shimming outside the package, the developer only sends 1 polyfill over the wire & all dependencies use that 1, keeping payloads as small as possible.
See this line: https://github.com/mattkrick/redux-optimistic-ui/blob/778e5ec0c85502553033d233de1c3fc43632b63f/src/index.js#L93
Could this be avoided? We usually use lodash to express things like that.