angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.73k stars 11.98k forks source link

Angular 17 with esbuild preset not detecting changes in folder with '.' in its name (dotfolder) #26494

Closed sinful-asura closed 9 months ago

sinful-asura commented 9 months ago

Which @angular/* package(s) are the source of the bug?

compiler, Don't known / other

Is this a regression?

No

Description

When creating a new Angular 17 App within a folder that contains a . character in its name, Vite watch daemon doesn't detect changes to the files. The ng serve command must be re-ran to detect these changes.

I have another app in Angular17 with webpack and it has no issues detecting changes despite having a . in folder name.

Workaround is to just rename a folder / move contents to a folder that has no . in its name.


Reproduction Scenarios

Below are provided two scenarios - one with issue reproduced and one where issue doesn't happen

Issue Occurs

Issue Doesn't Occur

Please provide a link to a minimal reproduction of the bug

https://youtu.be/3wbumEyzAXQ

Please provide the exception or error you saw

When the `ng serve` command is ran from the folder containing a `.` in its name, Vite doesn't detect any changes made in the files.

I have an older project also using Angular17 but is using webpack as a bundler and in that project this issue does not occur.

When I rename a folder or move contents of a fresh angular project to a folder without a `.` in its name, Vite detects the changes normally.

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.0.3
Node: 20.9.0
Package Manager: npm 10.1.0
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1700.3 (cli-only)
@angular-devkit/core         17.0.3 (cli-only)
@angular-devkit/schematics   17.0.3 (cli-only)
@schematics/angular          17.0.3 (cli-only)

Anything else?

No response

JoostK commented 9 months ago

Duplicate of #26441

angular-automatic-lock-bot[bot] commented 8 months ago

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.