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

82
Views
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 answers
Answer question

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