我需要使用lodash来处理客户端的一些数据。 Lodash似乎是完美的,但是在我通过它安装之后
npm install lodash
并将其包含在
<script type="text/javascript" src="node_modules/lodash/chain/lodash.js"></script>
我收到错误:
Uncaught ReferenceError: require is not defined
at lodash.js:1
我知道浏览器方面不支持使用require
加载模块,但我还应该如何在那里使用lodash呢?
PS。它是我需要的_.find()
。