esbuild ng serve not watching files outside project root
Command
serve
Is this a regression?
- [X] 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 servewith 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
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.
Also problem when using nx monorepo, when you change and code in libs, no rebuild / not watched. https://github.com/nrwl/nx/issues/16824
That issue is blocker for migrating to esbuild
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...
I also have same issue. I have paths mapping for internal design system, translate library. (monorepo scenario)
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.
same issue here
with each new version you break the basic functionalities. do you even test and/or use what you make?
@dick2tick, the esbuilder is still experimental and thus it is not yet feature complete.
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!?!
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
https://github.com/angular/angular-cli/blob/77f21c1ba1e9864ef7a7aea3c4e84b8f6428f5d7/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts#L662
Currently the watcher adds the
projectRootand some package manager changes but nothing else. Would need the option to configure or auto detect based off compilerOptions > paths to unblockhttps://github.com/angular/angular-cli/blob/77f21c1ba1e9864ef7a7aea3c4e84b8f6428f5d7/packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts#L662
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?
I test that feature, it's still not working. Watcher not checking tsconfig paths
in 16.1 it works for .ts files, but still not for html or css in libraries...
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.