-
Notifications
You must be signed in to change notification settings - Fork 153
fix: nativewind broken by import source being overwritten in default case #1315
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
Conversation
🦋 Changeset detectedLatest commit: c943fc9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3dfd4ec to
d658a9c
Compare
|
btw @dannyhw we should totally have unit tests for this and test the possible scenarios 💯 |
|
tests added 👍 |
jbroma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
|
@dannyhw can you please add changeset entry? Run |
|
On it 👍 |
1ba47db to
69e781e
Compare
…case fix: use a better fallback docs: remove some notes that are no longer necessary docs: more clarification docs: fix formatting and wording moving docs changes to separate pr review: inline default values test: add coverage for react transforms being included fix: add changeset fix: adjust changeset fix: adjust changeset
69e781e to
c943fc9
Compare
jbroma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
fixes: #1312 #1295
Summary
Fixes NativeWind integration being broken when using SWC loader.
The issue was in
getTransformReactRuntimeConfigwhich unconditionally overwroteruntimeandimportSourcefromreactRuntimeConfig, even when those values wereundefined. This would clobber the customimportSourcethat NativeWind sets in the SWC config (e.g.,nativewind).The fix uses nullish coalescing (
??) to preserve existing values whenreactRuntimeConfigdoesn't provide overrides.Test plan
importSourcewas overwritten)