Skip to content

ng-serve: bundle main.js loaded instead of public/main.js #29232

Closed
@mauriziocescon

Description

Command

serve

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.0.0 (not sure which one changed the behaviour... but for sure 19.0.0 was fine)

Description

Hey!

It seems to me the current ng serve (cli 19.0.6) has a problem loading any file named main.js saved in the public folder. The issue is very easy to reproduce:

  • create a new project,
  • save a simple main.js in public/test,
  • run ng serve
  • open http://localhost:4200/test/main.js,
  • the main.js from the bundle is loaded.
Image

Minimal Reproduction

  • create a new project,
  • save a simple main.js in public/test,
  • run ng serve,
  • open http://localhost:4200/test/main.js,
  • the main.js from the bundle is loaded.

Your Environment

cli 19.0.6

Activity

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

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions