TypeScript
Resolve lib paths in block code samples
Andrew Luo7d7c8ec32fce
diff --git a/apps/v4/lib/block-code-samples.ts b/apps/v4/lib/block-code-samples.tsindex 6e2d1e6..92d78bb 100644--- a/apps/v4/lib/block-code-samples.ts+++ b/apps/v4/lib/block-code-samples.ts@@ -197,6 +197,10 @@ function resolveSourceFilePath(filePath: string) {return path.join(appRoot, "hooks", filePath.slice("hooks/".length))}+ if (filePath.startsWith("lib/")) {+ return path.join(appRoot, "lib", filePath.slice("lib/".length))+ }+if (filePath.startsWith("registry/")) {return path.join(appRoot, "registry", filePath.slice("registry/".length))}