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

243
Views
Is there possible way to add base url for imports in react js?

Normal way adding imports:

import Sample from ‘../../../components/signup’

I need to imports without front dots and slashes:

import Component from ‘components/signup’

Can I add base url for imports to solve this problem? Is it the right way? Or if there a solution please leave the answer below.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you use Webpack, you can add the below code snippet into your webpack.config.js

resolve: {
  alias: {
     components: path.resolve(__dirname, 'src/components/')
  }
}
about 4 years ago · Santiago Trujillo 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!