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

difference between workerd and worker in conditions #393

Closed
himself65 opened this issue Jan 17, 2024 · 5 comments
Closed

difference between workerd and worker in conditions #393

himself65 opened this issue Jan 17, 2024 · 5 comments

Comments

@himself65
Copy link
Contributor

I noticed that waku is using workerd in the import conditions.

conditions: ['react-server', 'workerd'],
externalConditions: ['react-server', 'workerd'],

I think this is not correct. workerd is an alias for Cloudflare workers; I guess you are mentioning worker, which is for the web worker.

https://developers.cloudflare.com/workers/wrangler/bundling/#conditional-exports

@dai-shi
Copy link
Owner

dai-shi commented Jan 17, 2024

https://github.com/facebook/react/blob/5c607369ceebe56d85175df84b7b6ad58dd25e1f/packages/react-server-dom-webpack/package.json#L52

I specifically meant server.edge.

We can try server.browser if it has the capability we use, but we need to adjust everything.

@dai-shi
Copy link
Owner

dai-shi commented Jan 24, 2024

This is intentional for the moment. I wonder how we do it in the future. Each approach seems to have pros and cons.

@dai-shi
Copy link
Owner

dai-shi commented Feb 12, 2024

#394 (comment)

My idea is to use different outputs for different distributions.

We may try that in the future, once it has settled a bit more.

@dai-shi
Copy link
Owner

dai-shi commented Feb 12, 2024

somewhat related: #480

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 a pull request may close this issue.

2 participants