Created by: mpyw
babel-plugin-transform-es2015-modules-commonjs
has a serious bug about the following snippet and it is fixed in v6.26.0
release.
export const { variable } = otherVariable
- export const {variable} = otherVariable · Issue #193 · babel/babel-preset-env
- Fix commonjs exports with destructuring. by yavorsky · Pull Request #5469 · babel/babel
The problem is that current create-react-app
installs Babel v6.24.1
. It should be updated.
I'm not familiar with Babel and npm version resolution algorithm, however, I guess the reason; babel-preset-react-app
doesn't use caret ^
versioning and select old versions. So we may use caret or update the versions. (This PR simply update versions)