I have the following import i would usually use:
import ASScroll from '@ashthornton/asscroll'
But since the library uses the window object, which isn't available server side, I need to dynamically load it with next.js.
Here's what I tried and how I need to use initialize it:
const {ASScroll} = dynamic(import('@ashthornton/asscroll'), {ssr: false})
const smoothScroll = new ASScroll({element: '.outer'})
I get the following error though:
TypeError: ASScroll is not a constructor