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

199
Visualizações
Use local npm package within a different local npm package

I have two React/TypeScript packages that I'm developing, Grid and App. Internally, Grid is a dependency to App. Both of these packages have .tsx and .css files, but are in different folder structures due to the constraints of each project... aka, the relative path of the css and src files in each project is different. Each package is inside a single folder in my monorepo.

Here's what I'm looking for:

  1. I want Grid to be in it's own folder. I want to be able to keep it totally separate from App.
  2. I want to be able to edit Grid files while working on App, save them, and have my webpack watch command automatically recompile with the changed Grid files.
  3. I want to be able to import types, function, etc from Grid into App.

Is there a folder structure I can use that will easily do this? I know I can probably do something with soft linking the files, but I'm new to that, so any direction would be greatly appreciated.

This needs to work on both Mac, Linux, and Windows.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use npm link in the node app that you want to use as a package, and then npm link name in the project where you want to use linked app. Name is the name of the linked package (the one in package.json)

about 4 years ago · Juan Pablo Isaza 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