angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

[Question] Why is a feature not allowed to import another feature #50

Closed ngfelixl closed 3 years ago

ngfelixl commented 3 years ago

Hi,

thank you for developing this great library and providing the related knowledge. While working with NX DDD, it turned out that I am struggling with the imports of a feature into another feature. There is a "shell" feature of a domain with all its routing. In the routing I want to specify a component from a feature within the same domain. This however is not allowed, because in the root .eslint.rc it says

{
  "sourceTag": "type:feature",
  "onlyDependOnLibsWithTags": [
    "type:ui",
    "type:domain-logic",
    "type:util"
  ]
}

When I was reading through Nrwls "Enterprise Angular Monorepo Patterns" eBook, I found out that this type of restriction is not given here. Is this intended on your side or is the "type:feature" missing in the list of onlyDependOnLibsWithTags? If so, I would be happy to support and submit a PR.

Thank you in advance!

manfredsteyer commented 3 years ago

We don't generate rules for this by default, b/c it might produce cycles.