构建反应 js 时早午餐构建工具错误

Brunch build tool error while building react js

我在使用 brunch build 构建 React 组件时遇到错误。 这个错误是关于什么的?

 error: Compiling of js/assets/jss/material-dashboard-pro-react/views/userProfileStyles.jsx failed. L5:4 js/assets/jss/material-dashboard-pro-react/views/userProfileStyles.jsx: Unexpected token 
     3 |   cardTitle,
     4 |   cardIconTitle: {
   > 5 |     ...cardTitle,
       |     ^
     6 |     marginTop: "15px",
     7 |     marginBottom: "0px",
     8 |     "& small": {

也遇到了这个错误

14:44:44 - error: Compiling of js/components/Accordion/Accordion.jsx failed. L22:15 Unexpected token 
     20 |     };
     21 |   }
   > 22 |   handleChange = panel => (event, expanded) => {
        |                ^
     23 |     this.setState({
     24 |       active: expanded ? panel : -1
     25 |     });

您遇到 spread syntax and class properties 的错误。

您可以安装 babel-brunch and a preset that contains both spread syntax and class properties, like the stage-2 preset