mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-29 15:44:22 +00:00
fix(blocks): replace code with @/components/ui imports while copying from lift-mode (#3401)
FIXES : https://x.com/jimmeyer/status/1776487418150981661?s=46 The copy button in lift mode was copying code having imports as "@/registry/.../*.tsx" This PR replaces all the imports by "@/components/ui/*.tsx"
This commit is contained in:
@@ -55,7 +55,9 @@ export async function getBlock(
|
||||
|
||||
return {
|
||||
...chunk,
|
||||
code: sourceFile.getText(),
|
||||
code: sourceFile
|
||||
.getText()
|
||||
.replaceAll(`@/registry/${style}/`, "@/components/"),
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user