Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork578
-
Background
ResolutionI was able to resolve this (and enable React compiler) by taking the following steps:
Below is an example of my final babel config: module.exports=(api)=>{api.cache(false);return{presets:[['babel-preset-expo',{reanimated:true,//@see https://docs.reown.com/appkit/react-native/core/installation#create-babel-config-jsunstable_transformImportMeta:true,/** * Note: React compiler can be enabled here, but the beta version is incompatible with tamagui/babel-plugin */},],],plugins:[['@tamagui/babel-plugin',{components:['tamagui'],config:'./tamagui.config.ts',logTimings:true,disableExtraction:false,},],],overrides:[{/** * Note: This can also be configured via the babel-preset-expo preset. * When doing so (v53), this conflicted with the tamagui/babel-plugin. * * For this reason, we're configuring it manually here instead. */test:/\.(ts|tsx)$/,plugins:[['babel-plugin-react-compiler',{compilationMode:'infer',panicThreshold:'none',target:'19',/** * Use this callback to determine if the file should be processed by the react compiler. * * This is called for every TS file in the project. */sources:(filename)=>{// filter out files in node_modules + generated code.},logger:{logEvent(filename,event){// basic logging},},},],],},],};}; My understanding here is that the order of plugins matter. Both Tamagui and react-compiler arechanging my React source code. I suspect that one or more of the packages doesn't like being in the wrong order. Additional context
|
BetaWas this translation helpful?Give feedback.
All reactions
👍 4
Replies: 1 comment 1 reply
-
As part of my debugging into this, I tried the following cases. Only the first and last case worked. Every attempt to use the Expo preset failed.
|
BetaWas this translation helpful?Give feedback.
All reactions
👍 2
-
Thank you for this!! In case anyone else runs into this. Downgrading to Version You can probably try your luck with SDK54 as well. |
BetaWas this translation helpful?Give feedback.