Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/sandbox/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# ignore everything and force add a few important files
*
!.env
!.env
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
9 changes: 8 additions & 1 deletion apps/sandbox/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"experiments": {
"typedRoutes": true
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"userInterfaceStyle": "automatic",
"ios": {
"supportsTablet": true
"supportsTablet": true,
"bundleIdentifier": "com.anonymous.sandbox"
},
"plugins": [
[
Expand All @@ -41,6 +45,9 @@
"web": {
"bundler": "metro",
"output": "server"
},
"android": {
"package": "com.anonymous.sandbox"
}
}
}
45 changes: 25 additions & 20 deletions apps/sandbox/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
/* eslint-env node */
// Learn more https://docs.expo.dev/guides/customizing-metro/
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
const path = require('node:path');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname, { isCSSEnabled: true });
const monorepoRoot = path.join(__dirname, '../..');
const config = getDefaultConfig(__dirname);

// Minimize the "watched" folders that Metro crawls through to speed up Metro in big monorepos.
// Note, omitting folders disables Metro from resolving files within these folders
// This also happens when symlinks falls within these folders, but the real location doesn't.
config.watchFolders = [
__dirname, // Allow Metro to resolve all files within this project
path.join(monorepoRoot, 'packages'), // Allow Metro to resolve all workspace files of the monorepo
path.join(monorepoRoot, 'node_modules'), // Allow Metro to resolve "shared" `node_modules` of the monorepo
];
const path = require('path');
const localModulesPath = path.resolve(__dirname, './.expo/localModules');

// Disable Babel's RC lookup, reducing the config loading in Babel - resulting in faster bootup for transformations
config.transformer.enableBabelRCLookup = false;
config.resolver.resolveRequest = (context, moduleName, platform) => {
if (moduleName.endsWith('.nativeModule')) {
const relativePathToOriginModule = path.relative(
__dirname,
path.dirname(context.originModulePath)
);

config.resolver.blockList = [
/\/expo-router\/node_modules\/@react-navigation/,
/node_modules\/@react-navigation\/native-stack\/node_modules\/@react-navigation\//,
/node_modules\/pretty-format\/node_modules\/react-is/,
];
const modulePath = path.resolve(
localModulesPath,
relativePathToOriginModule,
moduleName.substring(0, moduleName.lastIndexOf('.nativeModule')) + '.js'
);

return {
filePath: modulePath,
type: 'sourceFile',
};
}

const resolution = context.resolveRequest(context, moduleName, platform);
return resolution;
};

module.exports = config;
11 changes: 7 additions & 4 deletions apps/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
"main": "expo-router/entry",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios"
"android": "expo run:android",
"ios": "expo run:ios"
},
"dependencies": {
"@react-navigation/bottom-tabs": "^7.3.10",
"@react-navigation/native": "^7.1.6",
"expo": "~53.0.9",
"expo-blob": "0.1.0",
"expo-constants": "~17.1.6",
"expo-linking": "~7.1.5",
"expo-router": "^5.0.7",
"expo-router": "~5.0.7",
"expo-splash-screen": "~0.30.8",
"expo-status-bar": "~2.2.3",
"react": "19.1.0",
"react-native": "0.80.1",
"react-native-safe-area-context": "5.4.0",
"react-native-screens": "4.11.1-nightly-20250611-8b82e081e"
"react-native-screens": "~4.11.1"
},
"devDependencies": {
"babel-preset-expo": "~13.1.11"
Expand Down
1 change: 1 addition & 0 deletions packages/@expo/cli/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import chalk from 'chalk';
import Debug from 'debug';
import { boolish } from 'getenv';


// Setup before requiring `debug`.
if (boolish('EXPO_DEBUG', false)) {
Debug.enable('expo:*');
Expand Down
1 change: 0 additions & 1 deletion packages/@expo/cli/src/run/startBundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export async function startBundlerAsync(
};

const devServerManager = await DevServerManager.startMetroAsync(projectRoot, options);

// Present the Terminal UI.
if (!headless && isInteractive()) {
// Only read the config if we are going to use the results.
Expand Down
Loading
Loading