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

chore(NA): adds explicit browser, node and default exports resolution #4772

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

mistic
Copy link
Contributor

@mistic mistic commented Oct 30, 2024

This PR follows up on what was done at #4755.

Even having into account the changes in the previous PR, webpack v5 still resolves @xyflow/react/dist/esm/index.mjs which then tries to resolve react/jsx-runtime within (and in that case it loaded from a .mjs which needs to be react/jsx-runtime.js).

The changes I'm proposing introduces a more explicit split in the resolution without room for wrong resolves going further.

\cc @peterkogo @moklick

Copy link

changeset-bot bot commented Oct 30, 2024

🦋 Changeset detected

Latest commit: 7f670ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@xyflow/system Patch
@xyflow/react Patch
@xyflow/svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@peterkogo
Copy link
Member

Thank you so much for this PR! This saved us a lot of time!

I tested this export configuration with React 17 & 18, with Next.js, CRA, vanilla Webpack and Vite. I really hope I covered all possible configurations this time.

What a mess this whole thing is... 😄

@peterkogo peterkogo merged commit 08ea5cf into xyflow:main Oct 31, 2024
1 check passed
@moklick moklick mentioned this pull request Oct 31, 2024
@mistic
Copy link
Contributor Author

mistic commented Oct 31, 2024

@peterkogo thank you so much for taking a look into this. I'm confident this will be enough to solve the problem. Unfortunately feels like currently the ecosystem is in a transition state so we got to live with this mess for a while 😃

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