You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems that there is no polyfill configured for Object.assign is react-popover's build pipeline so this call ends up in the build output.
Babel configuration for react-popover lives in package.json file which is included in distribution package.
We have transform-object-assign plugin enabled in our build pipeline for node_modules, but Babel 6.X has this weird behavior that when it stumbles upon a package.json#babel that is closer to the file it compiles than the root config file (.babelrc in our case), then it uses this newly found config instead of our root config, so our plugins are ignored and Object.assign call stays there.
IE11 doesn't like Object.assign, so we're having problems there.
Seems like Babel is aware of this configuration issue and fixed this in Babel 7.X, so we're migrating towards it (babel/babel#6766).
Anyway, maybe react-popover can
Get rid of the Object.assign call in this simple case
Hi.
We're happen to use
react-popover 0.5.10
(with React 16) in our project which is compiled by Babel 6.X. The problem is:react-popover
source code contains call toObject.assign
: https://github.com/littlebits/react-popover/blob/905e7545e32806abf8ee38f4557621e9bc5b1c1a/source/index.js#L487Seems that there is no polyfill configured for
Object.assign
isreact-popover
's build pipeline so this call ends up in the build output.Babel configuration for
react-popover
lives inpackage.json
file which is included in distribution package.We have
transform-object-assign
plugin enabled in our build pipeline fornode_modules
, but Babel 6.X has this weird behavior that when it stumbles upon apackage.json#babel
that is closer to the file it compiles than the root config file (.babelrc
in our case), then it uses this newly found config instead of our root config, so our plugins are ignored andObject.assign
call stays there.IE11 doesn't like
Object.assign
, so we're having problems there.Seems like Babel is aware of this configuration issue and fixed this in Babel 7.X, so we're migrating towards it (babel/babel#6766).
Anyway, maybe
react-popover
canGet rid of the
Object.assign
call in this simple caseMove Babel config from
package.json#babel
into.babelrc
and put that.babelrc
into.npmignore
so it's excluded from the distribution package and doesn't cause issues for users of Babel 6.X (similar issue: Extract babel config into .babelrc file and add it to .npmignore LinusBorg/portal-vue#32).Thanks.
The text was updated successfully, but these errors were encountered: