I want to replace all instances of
() => import('@/components/something/Something')
with
() => import(/* webpackChunkName: "components--something--Something" */ '@/components/something/Something')
So far I have this find/replace regex
Find: \(\) => import\('(.+?)'\)
Replace: () => import(/* webpackChunkName: "$1" */ '$1')
Which replaces:
() => import('@/components/something/Something')
with
() => import(/* webpackChunkName: "@/components/something/Something" */ '@/components/something/Something')
My problem is that I don't know how to replace the "@" and "/" characters
Do I need to execute two find/replace queries or can it be done with a single one? I want to remove the "@" entirely and replace the "/" by "--"
Any help much appreciated!
Thanks