我在angular6项目中包含了diff2html npm包,当我编译它时,我得到了:
ERROR in ./node_modules/diff2html/src/hoganjs-utils.js
Module not found: Error: Can't resolve 'path' in
'C:codesXXXnode_modulesdiff2htmlsrc'
知道是什么原因造成的吗?
我试着添加
"scripts": [
"node_modules/diff2html/dist/diff2html.min.js"
]
到angular.cli,但这对没有帮助
好的,我找到了解决方案。这解决了我的问题:[https://github.com/rtfpessoa/diff2html/issues/169][1]