babel 解构赋值无法问题

这个东西需要第二级, babel-preset-stage-2,然后再presets里引入stage-2的设置,再plugins离引入对应的插件

{
"presets": ["es2015", "react", "stage-2", "stage-3"],
"plugins": [
"transform-runtime", 
"transform-strict-mode",
"transform-es2015-modules-commonjs",
"transform-es2015-spread",
"transform-es2015-destructuring",
"transform-es2015-parameters",
"syntax-async-functions",
"transform-async-to-generator",
"syntax-export-extensions",
"transform-es2015-spread"
]
}

原文地址:https://www.cnblogs.com/so-letitgo/p/5815818.html