From 8bfee04c8c6948a88114d53769d4bb89b8ec7bf5 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 17 Jun 2023 23:05:46 +0000
Subject: [PATCH] popovers

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

diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs
index be6270e..e6bb3f0 100755
--- a/quartz/bootstrap-cli.mjs
+++ b/quartz/bootstrap-cli.mjs
@@ -71,9 +71,15 @@
           setup(build) {
             build.onLoad({ filter: /\.inline\.(ts|js)$/ }, async (args) => {
               let text = await promises.readFile(args.path, 'utf8')
+              // remove default exports that we manually inserted
+              text = text.replace('export default', '')
+              text = text.replace('export', '')
+
               const transpiled = await esbuild.build({
                 stdin: {
                   contents: text,
+                  loader: 'ts',
+                  resolveDir: '.',
                   sourcefile: path.relative(path.resolve('.'), args.path),
                 },
                 write: false,

--
Gitblit v1.10.0