Skip to content

Commit

Permalink
Add RSC config to app.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ProchaLu committed Jan 9, 2025
1 parent 1f5114f commit 5285bc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/expo-setup.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -30,6 +31,8 @@ appJson.expo.plugins = [

appJson.expo.web.output = 'server';

Check warning on line 32 in bin/expo-setup.js

View workflow job for this annotation

GitHub Actions / Lint, Check Types, Test

Unsafe member access .output on an `any` value

appJson.expo.experiments = { reactServerFunctions: true };

await writeFile(appFilePath, JSON.stringify(appJson, null, 2), 'utf8');
console.log('✅ Enabled Expo Router API Routes in app.json');

Expand Down

0 comments on commit 5285bc0

Please sign in to comment.