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

89
Vistas
Replacing resource import from old library by import from new library

I had run into a problem in my javascript project. I was using a resource from a library in my project, and I need to replace all instances of it by a resource of the same name, but from another library. The problem is that I'm importing this resource in more than a hundred files alongisde other resources.

What I need is to replace all instances of something that looks like this:

import {someResource, changedResource, anotherResource} from 'old-library'

By this:

import {someResource, anotherResource} from 'old-library'
import {changedResource} from 'new-library'

I need to keep the old imports that includes this resource that I want to get from the new library as well as importing the changed resource from the new library. Is that a way I can do that in Visual Code or I'll need to use some script in order to do that?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

right click project root folder ---> find in folder ---> expand the filter

for every "import {someResource, anotherResource} from 'old-library'" you should replace with "import {someResource, anotherResource} from 'old-library' import {changedResource} from 'new-library'"

example

enter image description here

becomes

enter image description here

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