Skip to content

Commit 618bb77

Browse files
authored
Merge pull request #3254 from roadev/main
chore: add babel-plugin-module-resolver as dev dependency
2 parents a615b4c + f991c54 commit 618bb77

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

packages/gluestack-ui/src/dependencies.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ const projectBasedDependencies: Dependencies = {
6262
'@gluestack-ui/core': '^3.0.10',
6363
'@gluestack-ui/utils': '^3.0.11',
6464
},
65+
devDependencies: {
66+
'babel-plugin-module-resolver': '^5.0.0',
67+
},
6568
},
6669
'react-native-cli': {
6770
dependencies: {

packages/gluestack-ui/src/util/config/expo-config-helper.ts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import fg from 'fast-glob';
33
import * as fs from 'fs';
44
import { config } from '../../config';
55
import { _currDir, getFilePath, pathResolver } from '.';
6-
import { PROJECT_SHARED_IGNORE, ExpoResolvedConfig } from './config-types';
7-
import { execSync } from 'child_process';
6+
import {
7+
PROJECT_SHARED_IGNORE,
8+
ExpoResolvedConfig,
9+
} from './config-types';
810
import { ensureFilesPromise } from '..';
911
import { commonInitialization } from '../init';
1012

@@ -88,21 +90,6 @@ async function initNatiwindExpoApp(
8890
permission: boolean
8991
) {
9092
try {
91-
// Use the configured package manager instead of hardcoded npx expo install
92-
const packageManager = config.packageManager || 'npm';
93-
const commands: { [key: string]: string } = {
94-
npm: 'npm install babel-plugin-module-resolver',
95-
yarn: 'yarn add babel-plugin-module-resolver',
96-
pnpm: 'pnpm add babel-plugin-module-resolver',
97-
bun: 'bun add babel-plugin-module-resolver',
98-
};
99-
100-
const installCommand = commands[packageManager];
101-
if (installCommand) {
102-
execSync(installCommand, {
103-
stdio: 'inherit',
104-
});
105-
}
10693
await commonInitialization(config.expoProject, resolvedConfig, permission);
10794
} catch (err) {
10895
throw new Error((err as Error).message);

0 commit comments

Comments
 (0)