• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

321
Vistas
How to use 'go to path' with aliases in VScode

Using VScode I can go open a file that I am importing using CTRL + click into the import declaration:

Go to file using VScode CTRL + click

By doing that the VScode will open the file index.js at the folder ./code

I also can create and export alias to some files using vue.config.js:

Exporting alias for files using vue.config.js

Then I can import using the alias:

Importing using the alias

The problem I want to solve is: How can I CTRL + click and open a file that were imported using alias?

There are any extensions that can do it?

It would be very useful, because when I need to edit the file I could go directly to it without having to manually look for the path.

almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can configure the path aliases in VS Code with a jsconfig.json file (or tsconfig.json if using TypeScript).

Create <projectRoot>/jsconfig.json with the compilerOptions.paths option set to glob patterns that match the ones from Webpack's resolve.alias:

{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@themeConfig": ["src/libs/themeConfig.js"],
      "@core/*": ["src/@core/*"],
      "@validations": ["src/@core/utils/validations/validations.js"],
      "@axios/*": ["src/libs/axios/*"]
    }
  }
}

screencast

almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda