#Overriding webpack config

8 messages · Page 1 of 1 (latest)

honest kestrel
#

We have an Angular library that has many components. We want to count the number of calls of each component inside the html template of the apps that uses our library so we opt for a build time solution by overriding the webpack, now when I merge the configs using a rule that has html-loader and my custom loader it logs nothing. is there any guide to walk me through this ?

tawny mauve
#

Angular doesn't use html-loader but a custom one

#

usually the "builders" that let you modify the config have a function for html transform as well

honest kestrel
#

Is it gonna give me the meta data of the component’s template ? for example: the HTML content or some js object that describes the AST of that HTML file

tawny mauve
#

it won't, do that, no

#

I guess you could just bundle up your entire app run it through ngcc and look at the Ivy output

#

that includes which components are used in which template

#

do you want to monitor this or just one off look at it?