为什么ES6的Arrow Function Compile不了呢?

你的.babelrc需要以下的:

{
  "presets": [
    "@babel/preset-env",
    "@babel/preset-react"
  ]
  ,
  plugins: [ "@babel/plugin-transform-arrow-functions", "@babel/plugin-proposal-class-properties" ]
}

NPM安装

npm install --save-dev @babel/plugin-transform-arrow-functions
npm install --save-dev @babel/plugin-proposal-class-properties

问题解决!