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

257
Vistas
webpack: how to switch between package.json alternatives to main attribute (unpkg, main:src, source, jsnext:main, main:umd, jsdelivr)?

How to switch webpack between package.json alternatives to main attribute: unpkg, main:src, source, jsnext:main, main:umd, jsdelivr when building bundle (to set up get source from them) ?

I know that some loaders prefer e.g. 'module' if it exists but I expect there should be also "manual" directive in webpack config: prefer another attribute for concreate dependency.

I have tried to guess is it possible with aliases syntax, but this doesn't work:

resolve: {
    alias: {
      "@popperjs/core": "main:umd"
    },
  },

Is there the standard way to open the 'package.json' of dependecy by its name? Then I would be able to parse it and put the path I need as alias.

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