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

Export maps in all packages to support NodeJS + ESM? #3396

Closed
mayank99 opened this issue Aug 11, 2022 · 3 comments
Closed

Export maps in all packages to support NodeJS + ESM? #3396

mayank99 opened this issue Aug 11, 2022 · 3 comments

Comments

@mayank99
Copy link

mayank99 commented Aug 11, 2022

🙋 Feature Request

Consider adding exports field to the package.json of react-aria and all its subpackages.

😯 Current Behavior

Currently there is no exports field, which means the package doesn't work in NodeJS + ESM environments.

https://publint.bjornlu.com/react-aria@3.18.0
https://publint.bjornlu.com/@internationalized/string@3.0.0

💁 Possible Solution

https://nodejs.org/api/packages.html#exports

🔦 Context

I'm trying to use components from react-aria with preact/compat on the server (SSR) using astro (which internally uses vite@3 which recently switched to ESM for SSR). I realize this is a convoluted setup but it would be really nice to make this work. Currently it works perfectly on the client but errors on the server, and I opened a bug in the astro repo which led me here. withastro/astro#4107 (comment)

@snowystinger
Copy link
Member

closing as dupe of #2881

@mayank99
Copy link
Author

@snowystinger Looks like that one is a bug report? Maybe the issue title needs to be updated because I did do a search before creating this issue.

@snowystinger
Copy link
Member

It started as a bug report, it may end up as a feature we add. The same conversation though is happening there #2881 (comment) so it'd be better to keep the discussion there. Feel free to chime in on that thread.
Don't worry if you missed it with a search. Anyone who searches and finds yours instead will now find a link to the original. :)

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

No branches or pull requests

2 participants