Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

235
Vistas
Optimize angular bundle size on WordPress site

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:

  • angular.js which is a concatenation of the runtime.js, polyfills.js, scripts.js and main.js files produced by the ng build command. These files are concatenated using a js script that uses the "concat" package
  • vendor.js which is a concatenation of js files from third-party libraries (jquery.min.js, jquery-match-height.js, jquery.columnizer.js, jquery.scrollTo.min.js, select2.min.js, stellarnav.min.js) and other handwritten js files. Also concatenated with a js script that uses the "concat" package
  • styles.css which is a concatenation and minification of the css file produced by ng build and other css files. Using "concat" and "csso" package in the js script

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

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda