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

Allow require imports #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mateotomas2
Copy link

@mateotomas2 mateotomas2 commented Jan 17, 2023

Description

Package.json exports is not defining a file to use when you use require only for import.
This is why I changed import to default so it handles both as a fallback. Maybe this is not correct and it should match a different file but this works for me.

Context:

I have a monorepo repository with a shared project imported in a react+vite project. And when I run the client in development mode I get this error:

'Failed to resolve entry for package "sirdez". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "sirdez" package'

Maybe it's a problem in my tsconfig or vite configuration, but this PR fixes it.

Oh I almost forgot to thank you for this cool library :D

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.

1 participant