-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[changelog][sdk31] Note changes to Babel 7 and babel.config.js #6155
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
- despite the upgrade to Babel 7 being mentioned in the blog post, it wasn't mentioned in the upgrade walkthrough or the CHANGELOG - if one were using the default, auto-generated .babelrc before SDK31, it would cause errors after upgrading to SDK31+, and there are no details about how to fix this when upgrading - the default babel config changed with SDK31 to a babel.config.js and no transform-react-jsx-source
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.
Thank you! I'll apply these suggestions myself and merge this PR. 👏
@@ -74,6 +74,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee | |||
} | |||
``` | |||
|
|||
- If using the default `.babelrc`, change to `babel.config.js`: |
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.
- If using the default `.babelrc`, change to `babel.config.js`: | |
- If using the default `.babelrc`, change it to `babel.config.js`: |
@@ -310,6 +310,7 @@ This is the log of notable changes to the Expo client that are developer-facing. | |||
- Several Haptic enum types have been renamed: NotificationTypes → NotificationFeedbackType, ImpactStyles → ImpactFeedbackStyle | |||
- Several AR enum types have been renamed: BlendShapes → BlendShape, FaceAnchorProps → FaceAnchorProp, PlaneDetectionTypes → PlaneDetection, WorldAlignmentTypes → WorldAlignment, EventTypes → EventType, AnchorTypes → AnchorType, AnchorEventTypes → AnchorEventType, FrameAttributes → FrameAttribute, TrackingStates → TrackingState, TrackingStateReasons → TrackingStateReason, TrackingConfigurations → TrackingConfiguration | |||
- `Audio.Sound.create` has been renamed to `createAsync` | |||
- upgrade `babel` to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373)) |
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.
- upgrade `babel` to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373)) | |
- Upgrade Babel to `7.0.0` by [@ide](https://github.com/ide) ([#2373](https://github.com/expo/expo/pull/2373)) |
@@ -72,6 +72,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee | |||
} | |||
``` | |||
|
|||
- If using the default `.babelrc`, change to `babel.config.js`: |
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.
- If using the default `.babelrc`, change to `babel.config.js`: | |
- If using the default `.babelrc`, change it to `babel.config.js`: |
@@ -73,6 +73,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee | |||
} | |||
``` | |||
|
|||
- If using the default `.babelrc`, change to `babel.config.js`: |
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.
- If using the default `.babelrc`, change to `babel.config.js`: | |
- If using the default `.babelrc`, change it to `babel.config.js`: |
@@ -97,6 +97,17 @@ Expo maintains ~6 months of backwards compatibility. Once an SDK version has bee | |||
} | |||
``` | |||
|
|||
- If using the default `.babelrc`, change to `babel.config.js`: |
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.
- If using the default `.babelrc`, change to `babel.config.js`: | |
- If using the default `.babelrc`, change it to `babel.config.js`: |
.babelrc
before SDK31, it would cause errors after upgrading to SDK31+, and there are no details about how to fix this when upgradingbabel.config.js
and notransform-react-jsx-source
I'm not sure if the PR I referenced in the added changelog entry is the correct one to use. While c75b43b of #2373 does change to
babel.config.js
, it seems to be internal changes only. The changes to the default, auto-generated.babelrc
tobabel.config.js
in the template seemed to have changed in the olduniverse
repo, which no longer exists. #4335 moved the templates over and is the only record I could find of these templates.Why
I recently upgraded a project from SDK29 to SDK33, and while there were a handful of issues, the one that was most confusing was why I was getting Babel errors. The
.babelrc
config I was using before was the default, auto-generated one by Expo, not anything custom, but apparently it broke during the SDK31 upgrade. It broke, but nothing about changing the Babel config was mentioned in the upgrade walkthrough docs or in the CHANGELOG (there is a mention of upgrading to Babel 7 in the blog post, but it seemed mostly internal and SDK29 already used Babel 7 RC1). The default Babel config was changed though (no moretransform-react-jsx-source
) and was changed to ababel.config.js
.I only found out about this issue and its fix by searching online, and there seemed to have been a great many people similarly confused by this:
This is definitely a breaking change, and on top of that, based on the issues and upvotes, it affected a lot of people (and may still affect more who are lagging on upgrades too), so I think it should definitely be mentioned in the upgrade guides and changelog for SDK31
How
Added an entry to the changelog and upgrade docs so that it is clearly addressed for those seeking to upgrade
Test Plan
N/A, just docs