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

153
Views
What is this in react import { HomePage } from '@/HomePage'

I know its importing a file but I don't know what the "@" stands for, I have seen a bunch of code snippets using this same syntax.

I tried implementing the same scenario in any way I thought could be possible but still no success

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

First you need to add babel-plugin-root-import in your devDependencies in package.json (If using yarn: yarn add babel-plugin-root-import --dev). Then in your .babelrc add the following lines into plugins key:

"plugins": [
[
  "babel-plugin-root-import",
  {
    "rootPathPrefix": "@"
  }
]
]

Now, you can use @. For example:

Instead of:

import xx from '../../utils/somefile'

You Can:

import xx from '@/utils/somefile'
about 4 years ago · Juan Pablo Isaza Report

0

They are webpack alias import, this configuration help to shorten your absolute/relative path.

Read more here: https://webpack.js.org/configuration/resolve/

about 4 years ago · Juan Pablo Isaza Report

0

This is used when you want to use Scope Packages.

What are Scope Packages? Ans - Scopes are a way of grouping related packages together, and also affect a few things about the way npm treats the package.

Please check this docs

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!