nghiepdev / smooth-scrollbar-react

A wrapper for smooth-scrollbar to React Component.
https://codesandbox.io/s/smooth-scrollbar-react-4pu86
MIT License
40 stars 5 forks source link

Getting error on Next.js #9

Closed pasindu-pr closed 3 years ago

pasindu-pr commented 3 years ago

Hey there, Can't I use this on Next.js? I installed both smooth-scrollbar, smooth-scrollbar-react on my Next.js project. But I'm getting the following error.

import { assign, extends } from "tslib"; SyntaxError: Cannot use import statement outside a module

What should I do to fix this?

nghiepdev commented 3 years ago

You can share your codesandbox example?

pasindu-pr commented 3 years ago

@nghiepit Check this please: https://codesandbox.io/s/next-with-react-smooth-scroll-bar-vew87?file=/pages/index.js

nghiepdev commented 3 years ago

@PasinduPrabhashitha I've just fixed https://codesandbox.io/s/next-with-react-smooth-scroll-bar-forked-tmz82?file=/pages/index.js