Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
How can I create a JS library with webpack importing only what is being used?

So, I need to create a npm react components and JS utility library, I'm using webpack but I have 2 problems.

  1. How can I compile the code (react code) and import like import { Component } from 'my-lib'; in a way that the final app only have the code imported and not the rest of the lib content.

  2. Some components/utils inside the library have extra dependencies, but sometimes the final project doesn't need those parts of the lib, and of course, adding those extra dependecies is not needed... But in my lib it says the dependency is needed to be installed in the final project.

I need some guide or start point to take a look.

Thanks!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda