bamlab / react-native-make

A collection of everyday React Native CLI tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Support Monorepo ?

fortezhuo opened this issue · comments

How to use this CLI while we use RN monorepo package like : https://github.com/brunolemos/react-native-web-monorepo/ ?

Hello, have you tried installing, and running it from the packages/mobile folder?

Yes. I have tried, but while I install from package/mobile, the module will be installed on root of project, and while I run react-native -h, the new commands (set-icon / set-splash) don't exist

Unfortunately I haven't been able to reproduce this issue.

It seems to be a problem with your environment setup and/or package manager. There is nothing I do at install time to force hoist to the parent package.

Can you:

  • Copy paste the install command you're using
  • Your directory structure
  • The package manager you're using (and it's version)
  • Try the install command with another dev-dependency

@fortezhuo @yleflour perhaps you need to specify nohoist options in your root package.json

{
   "workspaces":{
      "packages":[
         "packages/*"
      ],
      "nohoist":[
         "**/@bam.tech/react-native-make",
         "**/@bam.tech/react-native-make/**",
         "**/react-native",
         "**/react-native/**"
      ]
   }
}

sorry for late response.. @firdausious provides great solution.