Skip to content

fix: exports field includes package.json #765

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

Merged
merged 1 commit into from
Jul 18, 2024
Merged

fix: exports field includes package.json #765

merged 1 commit into from
Jul 18, 2024

Conversation

jlarmstrongiv
Copy link
Contributor

What is the motivation for this pull request?

Many users have bundler issues with this package and the html-react-parser package that depends on it. Sometimes it is necessary to change how packages are resolved—for example, to force loading the server version in certain environments.

However, resolving the server version is difficult when importing the package.json is disabled by the package.json exports field. This patch enables code to import the package.json.

Beyond this bundling use case, I have found importing the package.json may be useful for reading versions, dependencies, and other metadata.

What is the current behavior?

An error is thrown if you try to import the package.json

What is the new behavior?

Importing the package.json is allowed

Checklist:

Thank you for reviewing!

@remarkablemark remarkablemark merged commit d2e5dd1 into remarkablemark:master Jul 18, 2024
5 checks passed
@remarkablemark
Copy link
Owner

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

Successfully merging this pull request may close these issues.

2 participants