Skip to content

Middleware script is not triggered for files with specific extensions (js, css). #1936

@schmist

Description

@schmist

Describe the Bug

When using angular-builders/custom-esbuild:dev-server with a configured middleware, some calls to files with specific file extensions (tested js and css) are not triggering the middleware script.

Minimal Reproduction

  • Clone the repository below.
  • npm i
  • npm run start
  • Open assets/foo.txt, the content of the file is shown and the console shows the accessed path (printed by the middleware script).
  • Open assets/foo.js or assets/foo.css, the content is also shown, but no path is printed by the middleware.
  • The sameis true for a directory outside the src tree, mapped as public-assets/bar.*.

reproduction repository

Expected Behavior

All resources accessed through the dev server should be seen by a configured middleware script.

Environment

See minimal example for details, Angular 20+, angular-builders/custom-esbuild:dev-server 20.0.0.

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