1

In below project, I want all dependencies of TodoList will no be hosted to node_modules in root directory of monorepo.

enter image description here

Below settings is not enough to reach this effect:

{
  "private": true,
  "workspaces": {
    "packages": [ "BusinessRules", "Server", "TodoList" ],
    "nohoist": [
      "TodoList/**"
    ]
  }
}

"TodoList/**/**" is not enough too.

How to make all dependencies of TodoList will be inside TodoList/node_modules?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Takeshi Tokugawa YD
  • 670
  • 5
  • 40
  • 124

1 Answers1

0

Found the solution here.

In this case, it's required to add below JSON in TodoList/package.json:

"workspaces": {
    "nohoist": ["**"]
},
Takeshi Tokugawa YD
  • 670
  • 5
  • 40
  • 124