jechav / tiny-slider-react

wrapper of tiny-slider plugin for react.
https://tiny-slider-react-tests.netlify.app/
47 stars 27 forks source link

add support for next.js by avoiding tns initialization in SSR #55

Closed kdong007 closed 2 years ago

kdong007 commented 2 years ago
  1. changed tiny-slider to dynamic import
  2. avoid loading tns in SSR
  3. update import from tiny-slider/src/tiny-slider to tiny-slider so it can correctly follow tiny-slider's package.json "main"
kdong007 commented 2 years ago

tested on my local next.js app and deployed to https://www.design1mechanical.ca/

jechav commented 2 years ago

@kdong007 For using next.js you should implement it with dynamic import