我在我的React包中使用react-bootstrap-typeahead库。
我根据文档添加了以下导入语句:
import { Typeahead } from "react-bootstrap-typeahead";
import "react-bootstrap-typeahead/css/Typeahead.css";和渲染:
<Typeahead
id="basic-typeahead-example"
onChange={this.handleChange}
options={this.state.options}
placeholder="Choose..."
/>当我尝试构建时,我得到了:
static/js/main.4b322a5a.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./~/react-bootstrap-typeahead/~/escape-string-regexp/index.js:3,0]当我运行npm时,我可以说出真正的问题在哪里,因为代码运行得很好。react-bootstrap-typeahead库有什么问题吗?
发布于 2020-05-11 19:29:09
我安装了这个库的较低版本,它可以正常工作
https://stackoverflow.com/questions/61686490
复制相似问题