Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda