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

package.json exports causes problems with some environments #140

Closed
kevintap-idemia opened this issue Jan 14, 2022 · 0 comments · Fixed by #168
Closed

package.json exports causes problems with some environments #140

kevintap-idemia opened this issue Jan 14, 2022 · 0 comments · Fixed by #168

Comments

@kevintap-idemia
Copy link

kevintap-idemia commented Jan 14, 2022

The exports block in package.json for single-spa-react is incomplete and can cause problems in certain environments.

We have a rather complicated build process for one of our projects that is using strapi. The strapi build process has a parser that examines the dependencies of the project and attempts to extract details from the package.json file from each of the dependencies. I'm not 100% sure what it does with this data or how it's used by the build process. (Note, strapi has implemented a work-around for this in the latest 4.0.4 release.)

However, due to the exports block in package.json for single-spa-react, this is not compatible. Since package.json is not explicitly listed in the exports, it cannot be found/loaded if the single-spa-react package.json is attempted to be loaded by a require statement. The exports block should list package.json as an export from the single-spa-react package.

There are other exports that should also be allowed, such as "index", etc. See the description here: https://nodejs.org/api/packages.html#package-entry-points
Specifically the note about "To make the introduction of "exports" non-breaking".

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