Split in multiple npm packages (was "Change peerDependencies to optionalDependencies")
See original GitHub issueEdit: see comments below
So, 3 packages, and make
bootstrapdepend on the other 2,bootstrap-cssandbootstrap-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".
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:33 (24 by maintainers)
Top Results From Across the Web
Common npm mistakes - Medium
If you're authoring a module that has peer dependencies, be as loose as possible with your version requirement; don't just blindly use the ......
Read more >How do I handle optional peer dependencies when publishing ...
So if you're just using that library for type information, you probably don't have to list it as a dependency or optionalDependency anymore....
Read more >package.json - npm Docs
Changes to the package should come along with changes to the version. If you don't plan to publish your package, the name and...
Read more >Difference between dependencies, devDependencies and ...
Peer Dependencies : In package.json file, there is an object ... that our package is compatible with a particular version of an npm...
Read more >npm Peer Dependencies - Fathom
Semantic versioning generally defines the version of a package using three digits, major.minor.patch . Most normal or dev dependencies use one of two...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We will split Bootstrap in different packages in release 4.3
The intent of the issue is to split into multiple NPM packages, not to split the actual repo. Splitting the repo just came up as one approach to splitting the NPM package so I think it makes sense to leave this open.