我通过npm
安装了bootstrap@next
(v5.0.0-alpha1
(。我在脚本中添加了捆绑包JS,但编译后我收到了这个错误:
ERROR in ./node_modules/bootstrap/dist/js/bootstrap.esm.js
Module not found: Error: Can't resolve 'popper.js' in
'./foo/node_modules/bootstrap/dist/js'
自述文件清楚地说明(粗体文本(:
我们提供已编译的CSS和JS(bootstrap.(,以及已编译和缩小的CSS和JavaScript(bootstrap.min.(。源地图(bootstrat.*.map(可用于某些浏览器的开发工具捆绑的JS文件(bootstrap.bundle.JS和缩小的bootstrap.bundle.min.JS(包括Popper
angular.json
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.js",
],
知道我在这里会错过什么吗?
popper只需在package.json中列出就足够了;node_modules/bootstrap/dist/js/bootstrap.bundle.js";它对我有效。