Angular 6-导入需要文件的库

时间:2018-07-02 19:14:35

标签: angular webpack angular-cli angular6 angular-cli-v6

作为参考,我正在尝试让https://github.com/broofa/node-mime在NG 6项目中工作。我的理解是,目前无法在基于Angular CLI构建的NG 6项目中修改webpack配置。

基本上,我想将一个包含require调用的程序包导入到我的项目中,该调用是该程序包的一部分。

我收到以下错误:

  

./node_modules/mime/index.js中的错误

     

未找到模块:错误:无法解析'C:\ Dev \ LabOrdersAndResultsUI \ node_modules \ mime'中的'./types/other'

这告诉我 ./ types / other.json 在运行webpack时未打包。

在没有让软件包维护者提供其他版本的情况下解决此问题的最佳方法是什么?

0 个答案:

没有答案