Can't setup with Waypoints.js
[issue link]Hi. Never had so many issues with vanilla library before. I can’t set it up with Nut/SSR!!! Please help.
I tried multiple solutions, none is working. For example.
if (process.browser) {
require('waypoints/lib/noframework.waypoints.js')
require('waypoints/lib/shortcuts/inview.min.js')
}
let waypoint
let Waypoint
export default {
data () {
return {
waypointed: false
}
},
mounted () {
waypoint = new Waypoint.Inview({
element: document.querySelector('.waypoint'),
entered: (direction) => {
console.log(direction)
this.waypointed = true
},
exited: (direction) => {
console.log(direction)
this.waypointed = false
}
})
},
beforeDestroy () {
waypoint.destroy()
}
}
I have errors from webpack, from Nuxt, from eslint. Where’s the solution?