Angular 6 Library using bootstrap

后端 未结 6 2118
遇见更好的自我
遇见更好的自我 2021-02-19 13:14

I am creating an angular library in an angular project using angular 6 library feature https://github.com/angular/angular-cli/wiki/stories-create-library

I am creating f

6条回答
  •  终归单人心
    2021-02-19 13:24

    When you deliver your library you should add bootstrap as a peerDependency to package.json:

     "peerDependencies": {
        "ngx-bootstrap": ">= 

    Due to peerDependencies when someone installs your library ngx-bootstrap will get installed automatically, if it's not present. When the wrong version is installed the user of your library gets a warning.

    Here some more info: http://npm.github.io/using-pkgs-docs/package-json/types/peerdependencies.html

提交回复
热议问题