From 5285bc02b486ca28f1187b91df1359f2d739a285 Mon Sep 17 00:00:00 2001 From: Lukas Prochazka Date: Thu, 9 Jan 2025 13:25:04 +0100 Subject: [PATCH] Add RSC config to app.json --- bin/expo-setup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/expo-setup.js b/bin/expo-setup.js index cac252f..9586c07 100644 --- a/bin/expo-setup.js +++ b/bin/expo-setup.js @@ -1,7 +1,8 @@ // Enable Expo non-default options for performance: // -// 1. app.json - Enable API Routes +// 1. app.json - Enable API Routes and React Server Components // - https://docs.expo.dev/router/reference/api-routes/ +// - https://docs.expo.dev/guides/server-components/ // 2. .env.development, .env.production, eas.json - Enable the new Metro resolver available starting in Expo SDK 51 // - https://github.com/EvanBacon/pillar-valley/commit/ede321ef7addc67e4047624aedb3e92af3cb5060 // - https://archive.ph/MG03E @@ -30,6 +31,8 @@ appJson.expo.plugins = [ appJson.expo.web.output = 'server'; +appJson.expo.experiments = { reactServerFunctions: true }; + await writeFile(appFilePath, JSON.stringify(appJson, null, 2), 'utf8'); console.log('✅ Enabled Expo Router API Routes in app.json');