Emit StandaloneFeature for standalone components

refactor(compiler-cli): emit StandaloneFeature for standalone components (#45672)
Emit StandaloneFeature for standalone componentsrefactoremit standalonefeature standalone components compiler cli

Committed by alxhub

commit message
refactor(compiler-cli): emit StandaloneFeature for standalone components (#45672)

This commit adds an emit for standalone components of the
`StandaloneFeature`, which will support creation of standalone injectors and
any other mechanisms necessary for standalone component functionality at
runtime.
 
Using a feature allows for standalone functionality to be tree-shaken in
applications that aren't using them.
 
PR Close #45672

Editor assessment

An exemplar-grade refactor message. The subject names the exact artifact — emitting `StandaloneFeature` for standalone components — under an accurate `refactor(compiler-cli)` pairing. The body teaches twice over: it explains what the feature object supports at runtime (standalone injector creation and related mechanisms), then gives the design rationale — using a feature keeps standalone functionality tree-shakable in applications that never use it. That is motivation and trade-off in two paragraphs. Footers are the single well-formed `PR Close #45672` trailer. Style is clean: imperative subject, no trailing period, sensible length, no pasted material. A reader finishes genuinely educated about the change.

Browse categories

More refactor examples · Back to search