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

176
Vistas
How to create a webpack plugin that finds all objects with a specific field?

I'm trying to write a plugin that will collect information about all pages in the application that are marked with a special field. How can i get access to the fields of the object configuring the page?

Simplified example:

Let's say there are the following fragments in the source code:

First file:

    ...
    const SECRET_A = 'First secret phrase';
    const pageConfigA = {secretField: SECRET_A, pageUrl: 'xxx/aaa'};    
    ...

Second file:

    ...
    const SECRET_B = 'Second secret phrase';
    const pageConfigB = {secretField: SECRET_B, pageUrl: 'xxx/bbb'};    
    ...

How to create a plugin that can, for example, log (for example, to the console) all the fields of all objects in the code that contain the "secretField" field? For example, for this case, something like this should be displayed in the console during build:

    ...
    [
        {secretField: 'First secret phrase', pageUrl: 'xxx/aaa'},
        {secretField: 'Second secret phrase', pageUrl: 'xxx/bbb'}
    ]   
    ...
about 4 years ago · Juan Pablo Isaza
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