Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!