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

fix: define package.json export #168

Merged
merged 1 commit into from Jun 16, 2023
Merged

Conversation

darshkpatel
Copy link
Contributor

@darshkpatel darshkpatel commented May 7, 2023

compiling a react application using a rollup based plugin (@vitejs/plugin-react in my case) will throw an error if package.json isn't exported.

The only package failing in my usecase is single-spa-react I did test this change by manually adding this line to the package in the node_modules folder and compiling again.

Example of such a export: https://github.com/facebook/react/blob/16d053d592673dd5565d85109f259371b23f87e8/packages/react-refresh/package.json#L24
Related issue on another repo:
uuidjs/uuid#444

Fixes: #140

@courtyenn
Copy link

courtyenn commented May 22, 2023

I tried this fix and it didn't work for me. I instead deleted the "exports" config and fixed my own type issues within my project it worked.

Edit** I went in and compiled single-spa-react on its own and it seemed to work. Idk

courtyenn added a commit to courtyenn/single-spa-react that referenced this pull request May 22, 2023
Copy link
Member

@joeldenning joeldenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@joeldenning joeldenning merged commit 173a8ca into single-spa:main Jun 16, 2023
1 check passed
@joeldenning
Copy link
Member

joeldenning commented Jun 27, 2023

@darshkpatel do you know the solution to this typescript problem?

#173

@darshkpatel
Copy link
Contributor Author

darshkpatel commented Jun 28, 2023 via email

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 this pull request may close these issues.

package.json exports causes problems with some environments
3 participants