- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在angular 6
项目中,我使用angular cli
命令ng g lierary @some/libName
创建了 Angular 库。在我的库中,我有一个需要@ng-bootstrap/ng-bootstrap
的组件,因此我是通过npm i --save @ng-bootstrap/ng-bootstrap
添加的。
当我尝试使用ng build @some/libName --prod
命令构建库时,抛出以下错误。
Dependency @ng-bootstrap/ng-bootstrap must be explicitly whiteliste
最佳答案
更新资料
此警告来自 ng-packagr
(and there's now a section of the ng-packagr docs about this)。原来ng-packagr
只是告诉您它希望您将所有依赖项添加到"whitelistedNonPeerDependencies": []
中的ng-package.json
属性中。
例如:
{
"whitelistedNonPeerDependencies": [
"tslib",
...
]
}
ng-packagr
(angular-cli依赖于此生成和打包库)。我不确定“白名单”的含义,因为ng-packagr的文档中似乎没有直接解释该措词,但是
this issue in the ng-packagr repo对于解决该问题有很多不同的选择。
- Peers (such as Angular, RxJS): in this use case, the third-party dependency is a peerDependency of your library. Users of your library need to include both your library and the third-party library in their dependencies section.
- Embedding (e.g. legacy JS libraries): you have a legacy JavaScript library (e.g. an adapter to a proprietary backend) and you want to (need to) embed the legacy code in your library. In this case, the third-party dependency is a devDependency of your library and will be embedded into the bundle of your library.
- Mixed mode - embedded & peer (e.g. UX guidelines, Angularized styleguide): in this use case, the third-party dependency is a peerDependency but also (partially) embedded in your library. You may want to re-use existing CSS/SCSS/LESS stylesheets from the third-party library in your library, thus "embedding" code from the third-party in your library. At the same time, the third-party dependency is a peerDependency of your library.
关于ng-bootstrap - 依赖性@ ng-bootstrap/ng-bootstrap必须明确列入白名单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50306714/
我正在尝试从另一个网站远程连接到 SQL。我进行了 whois 查找以获取尝试连接的域的 IP 地址并将其列入 cPanel 中的白名单。我还执行了 echo $_SERVER['SERVER_ADD
Microsoft SmartScreen,以其消息而闻名: Windows Defender SmartScreen prevented an unrecognized app from start
我有一个由多个 .aspx 页面组成的 ASP.NET 应用程序。我希望其中一个 .aspx 页面只能由一组特定的 IP 访问。这可能吗? 我知道您可以在网站级别将 IP 列入白名单,但是您可以将应用
我是一名优秀的程序员,十分优秀!