Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commonjs build breaks rollup (vitejs) #50

Closed
blechatellier opened this issue Oct 1, 2021 · 6 comments
Closed

Commonjs build breaks rollup (vitejs) #50

blechatellier opened this issue Oct 1, 2021 · 6 comments

Comments

@blechatellier
Copy link

blechatellier commented Oct 1, 2021

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!

@blechatellier blechatellier changed the title Commonjs build breaks esbuild (vitejs) Commonjs build breaks rollup (vitejs) Oct 1, 2021
@uglow
Copy link

uglow commented Oct 19, 2021

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

@AlexanderRichey
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

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

@blechatellier
Copy link
Author

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

@AlexanderRichey
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants