Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Nx monorepo setup #73

Open
JoepKockelkorn opened this issue Oct 11, 2020 · 1 comment
Open

Support for Nx monorepo setup #73

JoepKockelkorn opened this issue Oct 11, 2020 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JoepKockelkorn
Copy link

What is this feature?

When developing in a nx.dev monorepo setup the following setup is quite normal: An app has two (lazy loading) feature modules mounted:

  • BooksModule mounted under books
  • OrdersModule mounted under orders

In a loosely coupled way, both features contain components that point to components of the other feature. For example, books has a routerLink pointing to orders/new and orders/{orderId} has a routerLink which points to books/{bookId}.

One of the advantages of using nx.dev is that libraries (the feature modules) can be reused in multiple apps. Currently RouterKit supports generating routes based upon an Angular app, resulting in {ROOT}/{APP_NAME}.routes.d.ts. Referencing the routes created from app 'A' in a feature lib is actually putting the dependency the wrong way around. From the internal dependency graph which the nx.dev tooling creates for you, app 'A' is using the feature lib. With the (described below) new features RouterKit can (probably) be used in a nx-dev monorepo setup.

How the feature should work?

I think the following is needed so RouterKit can be used in a nx-dev monorepo setup:

  • support for generating routing types for a lazy loaded feature lib (it currently does not support it, an error is thrown: Can't find file with relative path @my-solution/app/feature/feature.module.ts)
  • configuration of the output path of the resulting routing types, as they probably should end up in a separate library so nx.dev tooling can determine the dependency graph properly

Is your feature request related to a problem?

Yes, it's described in issue #49.

@JoepKockelkorn JoepKockelkorn added the enhancement New feature or request label Oct 11, 2020
@tarsisexistence
Copy link
Owner

@JoepKockelkorn thanks

We will back to this after major release 😊

@tarsisexistence tarsisexistence added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants