Move jQuery from dependencies to peerDependencies
See original GitHub issueHello, would you consider moving jQuery to peerDependencies instead of dependencies? I’ve had issues in the past with your project having jQuery in dependencies. In particular yarn install installs not only my version of jQuery that I have specified in my dependencies, but also your version specified in the ion.rangeSlider project dependencies. In result, two jQuery were included in the project and I couldn’t figure out why my slider doesn’t work with my version of jQuery. It just couldn’t find the plugin. Then I realised that there are two jQuery versions packed by webpack.
Here’s a nice article why plugins should include such dependencies inside peerDependencies: https://yarnpkg.com/blog/2018/04/18/dependencies-done-right/
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
jquery - How to resolve dependency hell in NPM with ...
Eventual solution: To avoid jquery dependency duplication (1.7.3 for outer_library and 3.3.1 for my_library) I could move my jquery ^3.3.1 from ...
Read more >Understanding Peer Dependencies in JavaScript
Peer dependencies really come into play when you're developing code that will be used by others, such as plugins and packages. If you're...
Read more >Why do I need to split between dev and prod dependencies?
I'm trying to understand the difference between dev and peerdependencies in a npm package.json file. Can someone explain what the difference ...
Read more >react-bootstrap-slider - npm
React and Bootstrap are listed as peer dependencies (peerDependencies ... Moved bootstrap, jquery, react and react-dom from dependencies to ...
Read more >npm Peer Dependencies - JavaScript inDepth
Peer Dependencies are listed in the package.json file in a peerDependencies object. By adding a package in peerDependencies you are ...
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

A nice work-around is bypass the AMD module switch by using: require(“!imports-loader?define=>false,exports=>false!ion-rangeslider”);
Thanks a lot @IonDen!