Skip to content

esbuild ng serve not watching files outside project root #25011

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
1 task done
gmfun opened this issue Apr 13, 2023 · 15 comments · Fixed by #25264
Closed
1 task done

esbuild ng serve not watching files outside project root #25011

gmfun opened this issue Apr 13, 2023 · 15 comments · Fixed by #25264
Labels

Comments

@gmfun
Copy link

gmfun commented Apr 13, 2023

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

v16.0.0-next.7

Description

Using nx workspace style project where app is in apps/some-app and it imports code from projects inside projects/some-project. When i use ng serve some-app with esbuild, changes in projects/some-project does not trigger reload.

The code in project/some-project is reference using tsconfig.json paths.

{
  "compilerOptions": {
       "paths": {
              "@org/some-project": ["projects/some-project/src/index.ts"]
       }
}

This used to work in v16.0.0-next.7 and with webpack based ng serve

Minimal Reproduction

  • create a new nx workspace
  • create an application
  • create a library
  • use the library in the application
  • run ng serve with esbuild for the application
  • make changes the the referenced library
  • reload is not triggered

Exception or Error

No response

Your Environment

v16.0.0-rc-0

Anything else relevant?

No response

@esagawe
Copy link

esagawe commented May 7, 2023

I have this problem, too, with Angular 16.0.0 (final release). All changes to Nx libs are complety ignored, even after an explicit reload.

@pumano
Copy link

pumano commented May 7, 2023

Also problem when using nx monorepo, when you change and code in libs, no rebuild / not watched. nrwl/nx#16824

@pumano
Copy link

pumano commented May 8, 2023

That issue is blocker for migrating to esbuild

@atsjo
Copy link

atsjo commented May 9, 2023

Same, using nx and angular 16 release. More or less all code is in libraries in the monorepo, so not usable for dev in such scenarios...

@leo6104
Copy link

leo6104 commented May 11, 2023

I also have same issue. I have paths mapping for internal design system, translate library. (monorepo scenario)

@yharaskrik
Copy link

Also running into this with an Nx monorepo. Can confirm it does not work with stuff outside app dir but does for code within app dir.

@Zwergenpunk
Copy link

same issue here

@ghost
Copy link

ghost commented May 17, 2023

with each new version you break the basic functionalities. do you even test and/or use what you make?

@alan-agius4
Copy link
Collaborator

@dick2tick, the esbuilder is still experimental and thus it is not yet feature complete.

@ghost
Copy link

ghost commented May 17, 2023

smart developer: I made a great car, the color is great, the comfort is great, everything is great; you can try it from v16
stupid developer: I can't start the car
smart developer: it's still an experimental car
stupid developer: ok, what's the point of a car!?!

@AdditionAddict
Copy link

AdditionAddict commented May 17, 2023

Currently the watcher adds the projectRoot and some package manager changes but nothing else.
Would need the option to configure or auto detect based off compilerOptions > paths to unblock

@yharaskrik
Copy link

Currently the watcher adds the projectRoot and some package manager changes but nothing else. Would need the option to configure or auto detect based off compilerOptions > paths to unblock

This doesn't seem excessively complex to add, @clydin I assuming this is already in the works though and theres no need for a community PR for this?

@pumano
Copy link

pumano commented May 27, 2023

I test that feature, it's still not working. Watcher not checking tsconfig paths

@atsjo
Copy link

atsjo commented Jun 13, 2023

in 16.1 it works for .ts files, but still not for html or css in libraries...

@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 Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
9 participants