I'm looking for a way to use my components replacing the standard templates with custom ones, but still keeping AOT compatibility.
I know it can be done writing a new component which replaces the original template, but I'd like to provide some convention-over-configuration instead.
Goal: if you use my-component and want to replace its original template, you just have to create a template named overrides/my-component.html
in the folder hosting the parent component.
Take for instance the ad-banner component used in the Dynamic Component Loader official Angular example: in that example hero-job-ad and hero-profile components are simply meant at replacing the original template within a certain context. I consider that code as quasi-configuration, so I'd like to provide some convention over it.
I thought this feature could be implemented adding some custom resource loader to webpack at compile time, but so far I cannot figure out how.