I'm new in Nuxt and I'm trying to use a jquery library "ionrangeSlider" but I get an error:
$(...).ionRangeSlider is not a function
I ran npm i ion-rangeslider
and I add the vendor in my nuxt.config.js:
build: {
vendor: [
"jquery",
"ion-rangeslider"
],
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
})
],
},
And in my component I have:
mounted(){
var that = this;
this.$nextTick(function(){
$(that.$refs.range).ionRangeSlider();
},
}
I think that nuxt doesn't compile correcty the library from node_modules, but I don't know what I can do :(