Skip to content

Solid: generated library writes incorrect path map into tsconfig.base.json #1161

Description

@ricrac-hac

Describe the bug
running the generator for a solid library results in a path being created with a redundant "libs" directory

To Reproduce

npx create-nx-workspace --preset=apps solid-test
cd solid-test
npm i @nxext/solid
nx g @nxext/solid:application apps/app-web
nx g @nxext/solid:lib libs/lib-app-web
cat tsconfig.base.json

See double libs. This breaks the path imports when you try to use components this exposes later.

    "paths": {
      "@solid-test/lib-app-web": ["libs/libs/lib-app-web/src/index.ts"]
    }

Expected behavior
Single libs

    "paths": {
      "@solid-test/lib-app-web": ["libs/lib-app-web/src/index.ts"]
    }

Additional context
Originally when I encountered this was in a pnpm project and I was passing --directory nx g @nxext/solid:library lib-app-web --directory libs/lib-app-web which had the same result. I recreated it in npm and using the shorthand syntax

This may be the same issue as #1034 but given it's a different generator I wasn't sure.

nx --version
Nx Version:
- Local: v20.2.2
- Global: v20.1.4

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions