AlexanderRichey / styled-react-modal

Styled modal component for React 💅⚛️
The Unlicense
213 stars 22 forks source link

Commonjs build breaks rollup (vitejs) #50

Closed blechatellier closed 2 years ago

blechatellier commented 3 years ago

Hello, any chance we could export styled-react-modal as an esm module instead of commonjs (or both), this is causing issues when compiling with rollup (vitejs).

Thanks!

uglow commented 3 years ago

+1 - Tried a multitude of different CJS plugins and configurations for Vite, but still have the same problem as @blechatellier.

AlexanderRichey commented 3 years ago

Sorry for taking a while to get back to you. I hope to have some time to look into this over the next couple weekends or so—busy times at my day job at the moment. I'd be happy to review a PR in the meantime if anyone has the time, but otherwise I'm hoping to address all the open issues before the new year.

AlexanderRichey commented 2 years ago

Hi @uglow and @blechatellier, I just published v3.0.0-alpha which uses rollup and exposes an mjs build. If you have a minute during this week, it would be great if you could test it out. You'll just need to run yarn add styled-react-modal@alpha or similar for npm. Everything seems to be working on a little vite project I started locally, but since I'm not really familiar with vite it would be great to have someone like you make sure I didn't miss anything.

blechatellier commented 2 years ago

@AlexanderRichey thanks so much, will give it a try and report back.

blechatellier commented 2 years ago

@AlexanderRichey works as expected now, thanks for your help!

AlexanderRichey commented 2 years ago

The fix has been released: https://github.com/AlexanderRichey/styled-react-modal/releases/tag/v3.0.0