我尝试将ng2-auto-complete模块用于Angular2,其中universal-starter由WebPack构建。安装的第二步告诉:
- 将
醇>map
和packages
添加到 systemjs.config.js
map['ng2-auto-complete'] = 'node_modules/ng2-auto-complete/dist';
packages['ng2-auto-complete'] = {main:'ng2-auto-complete.umd.js', defaultExtension: 'js'}
但是如何将此行隐藏到webpack配置文件中以避免出现错误?
C:\Users\qm69\Code\angular2\khex@universal-starter\dist\server\index.js:37738
var paramTypes = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });
^
TypeError: ctorParameters.map is not a function
at ReflectionCapabilities.parameters (C:\Users\qm69\Code\angular2\khex@universal-starter\dist\server\index.js:37738:45)
答案 0 :(得分:1)
2
不代表“第二步”。它是1
的替代品。
Webpack自动选择NPM模块,不需要SystemJS的配置。