I have a site that is based on WordPress with an integration of Angular (version 13). FYI, to be able to use Angular on php files (specific to WordPress) I had to create Custom Elements for each Component of my Angular app.
The site does not get a very good score on PageSpeed Insights on mobile (26) while on Desktop the score is 89. According to the results, the main cause of this bad score would be the files produced by Angular (css and js). These files produced by Angular are the result of a set of tasks performed during compilation. Here is the list of files:
Here is the size of the files:
angular.js --> 2.3MB
vendor.js --> 83.4 kB
styles.css --> 157 kB
So how to reduce the weight of the angular.js file? (according to my browser console the file is indeed gzipped)
A solution might be to use the Lazy Load modules, but can I do it on such an application (not using Angular routing)?
Thank you in advance for your help !
Best regards, Killian