From 5f4cc69fa68899dec7df5eb1881e27c9d4115a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=8D=EC=84=9C=ED=98=84?= Date: Wed, 18 Dec 2024 00:53:54 +0900 Subject: [PATCH] =?UTF-8?q?Fix/#29=20React=20Native=20=EC=8B=A4=ED=96=89?= =?UTF-8?q?=20=EC=95=88=20=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0=20(#30)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 의존성 설치 * feat: @react-native/gradle-plugin 설치 * fix: pnpm이 react-native 프로젝트에서 node_modules 찾지 못하는 문제 해결 --- apps/app/metro.config.js | 11 +++++++++-- apps/app/package.json | 1 + pnpm-lock.yaml | 38 +++----------------------------------- 3 files changed, 13 insertions(+), 37 deletions(-) diff --git a/apps/app/metro.config.js b/apps/app/metro.config.js index 9d41685..c87875e 100644 --- a/apps/app/metro.config.js +++ b/apps/app/metro.config.js @@ -1,11 +1,18 @@ const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); +const path = require('path'); /** * Metro configuration - * https://reactnative.dev/docs/metro + * https://facebook.github.io/metro/docs/configuration * * @type {import('metro-config').MetroConfig} */ -const config = {}; +const config = { + resolver: { + unstable_enableSymlinks: true, + unstable_enablePackageExports: true, + }, + watchFolders: [path.join(__dirname, '..', '..')], +}; module.exports = mergeConfig(getDefaultConfig(__dirname), config); diff --git a/apps/app/package.json b/apps/app/package.json index dfc9ab7..81295b1 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -26,6 +26,7 @@ "@react-native-community/cli-platform-ios": "15.0.1", "@react-native/babel-preset": "0.76.5", "@react-native/eslint-config": "0.76.5", + "@react-native/gradle-plugin": "^0.76.5", "@react-native/metro-config": "0.76.5", "@react-native/typescript-config": "0.76.5", "@types/react": "^18.2.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27bfce8..d9e8a7c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,6 +63,9 @@ importers: '@react-native/eslint-config': specifier: 0.76.5 version: 0.76.5(eslint@8.57.1)(jest@29.7.0)(prettier@2.8.8)(typescript@5.0.4) + '@react-native/gradle-plugin': + specifier: ^0.76.5 + version: 0.76.5 '@react-native/metro-config': specifier: 0.76.5 version: 0.76.5(@babel/core@7.26.0)(@babel/preset-env@7.26.0) @@ -94,40 +97,6 @@ importers: specifier: 5.0.4 version: 5.0.4 - apps/docs: - dependencies: - '@repo/ui': - specifier: workspace:* - version: link:../../packages/ui - next: - specifier: ^15.1.0 - version: 15.1.0(react-dom@19.0.0)(react@19.0.0) - react: - specifier: ^19.0.0 - version: 19.0.0 - react-dom: - specifier: ^19.0.0 - version: 19.0.0(react@19.0.0) - devDependencies: - '@repo/eslint-config': - specifier: workspace:* - version: link:../../packages/eslint-config - '@repo/typescript-config': - specifier: workspace:* - version: link:../../packages/typescript-config - '@types/node': - specifier: ^20 - version: 20.17.10 - '@types/react': - specifier: 18.3.1 - version: 18.3.1 - '@types/react-dom': - specifier: 18.3.0 - version: 18.3.0 - typescript: - specifier: 5.5.4 - version: 5.5.4 - apps/web: dependencies: '@repo/ui': @@ -2628,7 +2597,6 @@ packages: /@react-native/gradle-plugin@0.76.5: resolution: {integrity: sha512-7KSyD0g0KhbngITduC8OABn0MAlJfwjIdze7nA4Oe1q3R7qmAv+wQzW+UEXvPah8m1WqFjYTkQwz/4mK3XrQGw==} engines: {node: '>=18'} - dev: false /@react-native/js-polyfills@0.76.5: resolution: {integrity: sha512-ggM8tcKTcaqyKQcXMIvcB0vVfqr9ZRhWVxWIdiFO1mPvJyS6n+a+lLGkgQAyO8pfH0R1qw6K9D0nqbbDo865WQ==}