Skip to content

Add worker-related conditions #479

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
May 3, 2025
Merged

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented May 2, 2025

This should improve support for Cloudflare Workers and Vercel Functions. Bundlers for workers often, annoyingly, prefer browser conditions over node/default - so when we include a browser condition, we, almost always, have to specify the worker conditions first in the context of React.

Copy link

vercel bot commented May 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-resizable-panels ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2025 6:28am

Comment on lines +23 to +25
"edge-light": "./dist/react-resizable-panels.development.edge-light.js",
"worker": "./dist/react-resizable-panels.development.edge-light.js",
"workerd": "./dist/react-resizable-panels.development.edge-light.js",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice those are the same as the one for node - the bundle itself is reused. Those keys here are just listed in order of preference (remember those keys here are ordered - despite being just object keys)

Copy link
Owner

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"workerd" 😮‍💨 Whew, the JS toolchain can be exhausting sometimes

@bvaughn bvaughn merged commit 17295b3 into bvaughn:main May 3, 2025
7 checks passed
@bvaughn
Copy link
Owner

bvaughn commented May 3, 2025

Published in 3.0.1

Thanks!

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.

2 participants