IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.55k stars 506 forks source link

Move jQuery from dependencies to peerDependencies #546

Closed c-emil closed 4 years ago

c-emil commented 6 years ago

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/

IonDen commented 6 years ago

Hi, thanks for info, i will check it soon.

InhouseMedia commented 6 years ago

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

juniorgarcia commented 6 years ago

Doesn't work here. Same error.

c-emil commented 4 years ago

Any progress on this one?

IonDen commented 4 years ago

@c-emil done in 2.3.1. Check latest release

c-emil commented 4 years ago

Thanks a lot @IonDen!