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

Support node module resolution #151

Closed
nyan-left opened this issue Dec 2, 2024 · 5 comments
Closed

Support node module resolution #151

nyan-left opened this issue Dec 2, 2024 · 5 comments

Comments

@nyan-left
Copy link
Contributor

Issue

Currently @pmndrs/uikit fails with node module resolution due to yoga-layout's package exports configuration.

Blocked by: facebook/yoga#1760

Once the yoga-layout maintainers implement a fix, it would be great to update @pmndrs/uikit to incorporate their changes.

Current Error

error TS2307: Cannot find module 'yoga-layout/load' or its corresponding type declarations.

This is a tracking issue to implement the fix once available upstream.

@bbohlender
Copy link
Contributor

shouldnt module resolution node16 or nodenext be enough. Node 16 isnt even supported anymore, so setting the module resolution to it should be a fine requirement for all your users, right?

@nyan-left
Copy link
Contributor Author

The tricky part is that downstream users may be using node resolution for valid reasons, even in modern projects. Supporting node resolution would help ensure the library works smoothly in the widest range of build setups without requiring users to adjust their ts configs.

I know node resolution isn't recommended anymore (https://www.typescriptlang.org/docs/handbook/modules/reference.html#node10-formerly-known-as-node), but the reality is some setups still use it.

@bbohlender
Copy link
Contributor

Since the work to support this is on yoga's side, I dont have a strong opinion here, but I honestly would rather tell people to change to recommended settings, then to keep investing time into supporting unsupported configurations while there's still a long roadmap for the library itself. Its not important here, but I wanted to clarify it anyways :D

@nyan-left
Copy link
Contributor Author

Fair enough! 😄 Makes sense to focus on the roadmap - just wanted to raise the compatibility point since I'm running into it. Let's see what the yoga folks say. Thanks for the quick response!

@nyan-left
Copy link
Contributor Author

ts4 support in yoga not planned - facebook/yoga#1764 (comment)

@nyan-left nyan-left closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2024
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