创建React包

时间:2018-08-21 17:01:24

标签: javascript node.js reactjs npm yarnpkg

我创建了react包并将其发布在npm上

现在,当我将其安装在另一个应用程序中并开始使用它时,我会遇到此错误

Failed to compile

./node_modules/react-clicky/Clicky.js
Module parse failed: Unexpected token (6:9)
You may need an appropriate loader to handle this file type.
| // @props style?: object, onClick?: void, url?: string, scroll?: string
| class Clicky extends React.Component {
|   onClick = () => {
|       const { onClick, url, scroll } = this.props;

0 个答案:

没有答案
相关问题