【发布时间】:2016-11-02 12:13:08
【问题描述】:
angular-cli beta 18 出现错误
Error: Uncaught (in promise): TypeError: __WEBPACK_IMPORTED_MODULE_6_lodash__.find is not a function
Lodash + Types 被添加到 package.json 中:-
"lodash": "4.14",
"@types/lodash": "4.14.38",
在 angular-cli.json 的脚本部分中,我们引用了该模块
"../node_modules/lodash/lodash.js",
我们正在使用以下方式导入 lodash:-
import * as _ from 'lodash';
编译后的scripts.bundle.js 包含了lodash javascript。
有什么我忘记了吗?
谢谢!
【问题讨论】:
标签: angular lodash angular2-cli