【发布时间】:2020-05-07 22:50:21
【问题描述】:
我在 IE11 中使用 @material-ui/core 在 bundle.js 的以下行中遇到语法错误:
const withStyles = (stylesOrCreator, options = {}) => Component => { const {
withTheme = false,
flip = null,
name } = options
箭头函数在安装 @material-ui 之前工作 这是我的 .babelrc:
{"presets": ["react", "env", "stage-2"],
"plugins": ["transform-async-to-generator",
"transform-es2015-arrow-functions" ,"transform-object-rest-spread", "transform-async-functions", ["transform-runtime", {
"polyfill": true,
"regenerator": true
}]]
}
反应 v16.3.2
【问题讨论】:
标签: reactjs material-ui internet-explorer-11