mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The AOT compiler now has the capability to handle component stylesheet files as external runtime files. External runtime files are stylesheets that are not embedded within the component code at build time. Instead a URL path is emitted within a component's metadata. When combined with separate updates to the shared style host and DOM renderer, this will allow these stylesheet files to be fetched and processed by a development server on-demand. This behavior is controlled by an internal compiler option `externalRuntimeStyles`. The Angular CLI development server will also be updated to provide the serving functionality once this capability is enabled. This capability enables upcoming features such as automatic component style hot module replacement (HMR) and development server deferred stylesheet processing. The current implementation does not affect the behavior of inline styles. Only the behavior of stylesheet files referenced via component properties `styleUrl`/`styleUrls` and relative template `link` elements are changed by enabling the internal option. PR Close #57613 |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| index.ts | ||
| README.md | ||
What is the 'annotations/component' package?
This package implements the ComponentDecoratorHandler, which processes and compiles @Component-decorated classes.
Component compilation is complex, and so not only is this package split out from the parent 'annotations' package, but its functionality is divided into separate files. In Angular, the concept of a component is an extension of a directive, so much of the component compilation functionality is shared with directive compilation, and is imported from the 'annotations/directive' package.