I have a component library package and it's used in a lot of files like this:
import { Grid, Heading, Button } from 'component-library'
I want to change all of my import to something like this:
import { Grid } from 'component-library/lib/Grid'
import { Heading } from 'component-library/lib/Heading'
import { Button } from 'component-library/lib/Button'
I found an extension on VSCode for doing this:
https://marketplace.visualstudio.com/items?itemName=angelomollame.batch-replacer&ssr=false#overview
And it seems it's accepting regex too. I tried to write a regex to find a replace old imports to a new one but my regex not working. This is my current regex:
(?:import)\s+([\w,{}\s\*]+)\s+(?:from)?\s*(?:["'])?([@\w\s\\\/.-]+)(?:["'])?\s*
Can you help me to fix this?
