Skip to content

Split in multiple npm packages (was "Change peerDependencies to optionalDependencies")  #23557

@tkrotoff

Description

@tkrotoff

Edit: see comments below

So, 3 packages, and make bootstrap depend on the other 2, bootstrap-css and bootstrap-js




jQuery and Popper.js are defined as peerDependencies: https://github.com/twbs/bootstrap/blob/v4.0.0-beta/package.json#L69

Bootstrap can be used without the JS part (think of reactstrap, React-Bootstrap, Angular UI Bootstrap, NG Bootstrap, BootstrapVue...)

Suggestion: switch to optionalDependencies so there is no warning when not installing jQuery and Popper.js.

$ yarn
...
warning "bootstrap@4.0.0-beta" has unmet peer dependency "jquery@>=3.0.0".
warning "bootstrap@4.0.0-beta" has unmet peer dependency "popper.js@^1.11.0".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions