Skip to content

Issue with export paths when library generated using angular cli #30886

Closed

Description

@gchalamasetty

Command

generate

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

^19

Description

When a library is generated using ng generate library, there is an Issue/bug with export path of the library module in public-api.ts.

Minimal Reproduction

To reproduce this issue:

  1. Go to this stackblitz project
  2. Open new terminal and run ng generate library lib-gen-test --standalone=false
  3. After library is successfully created, go to public-api.ts file of the new library and notice the issue with export module statement.

New library name: "lib-gen-test, you should see a lib-gen-test.module.ts file created in the library.

Expectation:
I should see export * from './lib/lib-gen-test.module'; in public-api.ts file.

Current Behavior/Issue:
I see export * from './lib/lib-gen-test-module'; in public-api.ts file.

Instead of dot(.) i am seeing a dash(-) in module path.

Exception or Error


Your Environment

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.0
@angular-devkit/core         20.0.0
@angular-devkit/schematics   20.0.0
@schematics/angular          20.0.0
rxjs                         7.8.2
typescript                   5.8.2
zone.js                      0.15.0

Anything else relevant?

No response

Activity

  1. added
    freq1: low
    on Aug 12, 2025
  2. added theissue type on Aug 12, 2025
  3. added a commit that references this issue on Aug 13, 2025
    7da3dbf
  4. added 2 commits that reference this issue on Aug 13, 2025
    e46d9c5
    02b0506
  5. angular-automatic-lock-bot commented on Sep 13, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 13, 2025
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

    area: @schematics/angularfreq1: lowseverity5: regressiontype: bug/fix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions