« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js
index 36cd27f..4f7c524 100644
--- a/src/content/dependencies/index.js
+++ b/src/content/dependencies/index.js
@@ -160,7 +160,13 @@ export function watchContentDependencies({
 
       let spec;
       try {
-        spec = (await import(cachebust(filePath))).default;
+        const module =
+          await import(
+            cachebust(
+              '.' +
+              path.sep +
+              path.relative(metaDirname, filePath)));
+        spec = module.default;
       } catch (caughtError) {
         error = caughtError;
         error.message = `Error importing: ${error.message}`;