Skip to content

Conversation

@Deku-nattsu
Copy link

I am writing a rsbuild plugin that compiles angular, it uses the compilation classes underneath and thanks to the exposure of createAngularCompilation its been fairly smooth to implement.

however I’ve encountered a blocker when wiring up a dev server that correctly associates component TypeScript files with their html template resources. for this a dependency map is needed and that's what getResourceDependencies provides. but it isn’t publicly accessible from the compilation which is fair.

so right now, the only option seems to be creating a second Angular compiler instance in my plugin solely to access that API, which isn’t ideal. (i could be missing something?)

the PR change stores the dependencies map and returns it in initialization result which worked well in my case, but i am not sure if this is the right approach or what overhead it could introduce.

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/build labels Nov 9, 2025
Copy link
Member

@clydin clydin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.
Overall the change looks good.
Only concern, since this is an externally usable API, is the fileDependencies name. It may be overly broad of a term here since it's only the external resource files for the components in a given source file and not all the dependencies of a given file.

@alan-agius4 alan-agius4 added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: minor This PR is targeted for the next minor release labels Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews area: @angular/build detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants