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

233
Visualizações
How to use a npm package for development without building it every time?

I am using npm link to point to a local clone of the npm package. In the package.json file of the npm package I have set the entrypoint to dist/index.js. When I develop on the local version I don't want to rebuild the project every time. How can I solve this problem?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Leave the package.json file entry point set to the dist/index.js file.

Then set a new scripts option in the package.json file to run tsc <filename> -w. This will run the TypeScript Compile command with the watch flag. This will recompile when files change in the directory.

If you have a different flow that doesn't use tsc directly or doesn't support a watch flag then see the link below that usesnodemon.

https://stackoverflow.com/a/48255950/5779200


You can't avoid the build process so it's best to embrace it and understand the advantages of not changing the entry point between the deployment and the development.

  • Simple flow, just press start, and your startup script should run it on its own
  • Same output in Prod and local development means less things to break
  • Auto rebuilding on changes allow for faster development of not having to re-execute commands
over 4 years ago · Santiago Trujillo Relatório
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