From fd5c8d17d3b3cd0a13b0a21a2b78d85010e02e12 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Tue, 20 Jun 2023 03:37:45 +0000
Subject: [PATCH] basic search implementation

---
 quartz/bootstrap-cli.mjs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index e6bb3f0..2824f8e 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -75,12 +75,14 @@
               text = text.replace('export default', '')
               text = text.replace('export', '')
 
+              const sourcefile = path.relative(path.resolve('.'), args.path)
+              const resolveDir = path.dirname(sourcefile)
               const transpiled = await esbuild.build({
                 stdin: {
                   contents: text,
                   loader: 'ts',
-                  resolveDir: '.',
-                  sourcefile: path.relative(path.resolve('.'), args.path),
+                  resolveDir,
+                  sourcefile,
                 },
                 write: false,
                 bundle: true,

--
Gitblit v1.10.0