question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move jQuery from dependencies to peerDependencies

See original GitHub issue

Hello, 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:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
InhouseMediacommented, Apr 24, 2018

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

0reactions
c-emilcommented, Dec 20, 2019

Thanks a lot @IonDen!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found