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

156
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 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