mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 20:56:42 +02:00
pnpm's strict isolated dependency resolution prevents @babel/core from finding babel-preset-expo and @babel/plugin-transform-react-jsx during Metro bundling. The pre-install hook creates .npmrc with node-linker=hoisted at the monorepo root so pnpm uses a flat node_modules on EAS Build. Also simplified metro.config.js by removing manual monorepo watchFolders config (handled automatically by expo/metro-config since SDK 52). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
468 B
Bash
Executable file
13 lines
468 B
Bash
Executable file
#!/bin/bash
|
|
# EAS Build pre-install hook
|
|
# Creates .npmrc with node-linker=hoisted at the monorepo root
|
|
# so pnpm uses a flat node_modules structure compatible with
|
|
# React Native / Metro bundler module resolution.
|
|
|
|
MONOREPO_ROOT="$EAS_BUILD_WORKINGDIR"
|
|
if [ -z "$MONOREPO_ROOT" ]; then
|
|
MONOREPO_ROOT=$(cd "$(dirname "$0")/../../../.." && pwd)
|
|
fi
|
|
|
|
echo "node-linker=hoisted" > "$MONOREPO_ROOT/.npmrc"
|
|
echo "Created .npmrc with node-linker=hoisted at $MONOREPO_ROOT"
|