-
Notifications
You must be signed in to change notification settings - Fork 26.7k
Description
Context
There are a few changes that need to be made to the component_benchmark
macro. The
🚀 Desired changes
Relevant Package
This feature request is for @angular/dev-infra-private-builds
Change List
- Asset injection
- Better error handling
- More nuanced static asset args
Describe the solution you'd like
Asset injection
This deals with the issue of providing a theme to a page. The components team would like to be able to provide a theme as a label to component_benchmark
and have those styles be applied to the default index.html.
I will complete this description once I have a conversation with @devversion.
Better error handling
Currently there aren't any descriptive errors provided when component_benchmark
is used improperly.
In particular, there is no explicit error message for when assets
are provided without an index.html
, which results in no index.html
since the default one is provided as a default through the assets
arg.
More nuanced static asset args
The way that static assets are provided can be improved upon by allowing more specific and commonly provided static assets to be their own args. Right now if you want to provide a single static asset you must also provide your own index.html
and cannot use the default one.
Specifically, it would make sense to add an arg to separate index.html
from assets
.
Describe alternatives you've considered
Asset Injection
- Use
genrule
to createstyles.css
so that you can use the transitivestyles.css
. - Provide a theme through a components
stylesUrls
and setting the component's view encapsulation to none.