Skip to content

Monorepo path resolutions #11

@clowNay

Description

@clowNay

First of all, thanks for making this available we have been looking for something like this for some time now.

We have noticed some issues:

  • +types from react-router is not located in the same location as the route entry when using relative path. It resolves the types from where the routes.ts file is located, which doesn't match the monorepo setup.
  • root layout.tsx in app/routes is not resolved as a layout for a routes inside monorepo workspace directory.

Our react router monorepo setup:
apps/<appName>/app/routes/*
modules/<moduleName>/src/routes/*

With apps and modules being workspaces of the monorepo.
Each module can have it's own routes but not a routes.ts file, which resides in our app/routes.ts.

Example:
Route relative path from cwd: ../../modules/<module>/src/routes
+types get placed relative from routes.ts file which places the type file in the wrong directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions