Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sinful-asura opened this issue Nov 26, 2023 · 2 comments

Comments

@sinful-asura
Copy link

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

  • ng new dotfolder-app --directory=./.dotfolder

? Which stylesheet format would you like to use? SCSS [ https://sass-lang.com/documentation/syntax#scss ]
? Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No

  • cd ./.dotfolder
  • ng serve
  • Change contents of app.component.html > Save
  • No changes detected
  • Re-run ng serve, changes will be reflected

Issue Doesn't Occur

  • ng new regular-app --directory=./regular

? Which stylesheet format would you like to use? SCSS [ https://sass-lang.com/documentation/syntax#scss ]
? Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No

  • cd ./regular
  • ng serve
  • Change contents of app.component.html > Save
  • Changes detected and browser does an auto-refresh

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 JoostK transferred this issue from angular/angular Nov 26, 2023
@JoostK
Copy link
Member

JoostK commented Nov 26, 2023

Duplicate of #26441

@JoostK JoostK marked this as a duplicate of #26441 Nov 26, 2023
@JoostK JoostK closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants