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

132
Visualizações
How to import files outside src in crete-react-app

In general, I have a project that contains the app and lib folders. in the base I should have all the components, in short, this is my component library and from there I need to import what I need into the project into the app folder.

app
   > electron
   > viewer
   > web
lib
   > base
   > game

but in create-react-app the webpack is configured so that I cannot import outside the src folder. I tried to write in .env NODE_PATH = ./../../ and it helped, but other errors were already pouring in: You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See webpack.js.org - points to my exported component from there. Help, how can I make the lib / base repository a library and import everything I need from there in a project that lies outside. Thank you

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

0

You would need to eject from Create React App and then modify your webpack config to allow it to search directories other than src/

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