Kris Ellery

Results 16 comments of Kris Ellery

Hi there! Are there any plans to patch this bug in v5 or provide a valid alternative? It's still an issue in `5.3.3` and `6.0.0-alpha.1`. Much appreciated!

@DavidChouinard which version of Next.js, and its bundler, do you use? Some bundlers do not recognize the `exports` key in `package.json` and follow the `main` or `module`. Are you able...

You could also try setting `experimental: { esmExternals: false }` in `next.config.js`.

@cs-ashiqu I'm not sure if there are any other workarounds. My [CodeSandbox](https://codesandbox.io/s/next-js-with-react-slider-09p8gu) example uses Next 12, React 18, and ReactSlider v2 w/out any issues. I tried it with and w/out...

@timichal thanks for that! I was able to reproduce and I'm going to investigate further why Next.js is not working here.

`experimental: { esmExternals: false }` is the easiest fix, but it could affect your application bundle, which is not ideal. I did preliminary testing/debugging and for some reason Next.js does...

@consegrado Thats one of the solutions. You can read more about dual-packaging [here](https://github.com/sheremet-va/dual-packaging) and [here](https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html). `create-react-styleguide`, which `react-slider` is based on, follows the latter approach.

@DavidChouinard you can still use `[email protected]` to make Next.js happy. The v2 improvements are minuscule for a single component. We'll do our best to get the bundle issue fixed, I'm...

Fixed in `2.0.2`. Here is [CodeSandbox](https://codesandbox.io/s/next-js-with-react-slider-09p8gu) with working example. @DavidChouinard can you please confirm? Thanks!

Ahh, makes sense. Must be something with WebKit as Chrome on iOS doesn't work as well.