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

prefer web over node export condition for non-node targets #1123

Closed
pi0 opened this issue Apr 11, 2023 · 1 comment · Fixed by #1401
Closed

prefer web over node export condition for non-node targets #1123

pi0 opened this issue Apr 11, 2023 · 1 comment · Fixed by #1401
Labels
bug Something isn't working discussion enhancement New feature or request

Comments

@pi0
Copy link
Member

pi0 commented Apr 11, 2023

When resolving dependencies (both bundled and externalized), we also add a node export condition (like this).

Doing this, basically breaks dual build for packages like uncrypto because they assume node is for Node.js only but it is also necessary to use node condition always because (sadly) many libraries in npm ecosystem still consider node ==== server. We need to be cautious how to approach this but also eventually push the ecosystem and common libs to use a better condition

Example for vue-router conditions:

image

@pi0
Copy link
Member Author

pi0 commented May 8, 2023

Next.js seems using edge-light condition

Also related wintercg/runtime-keys#5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant