From e587d189f76cb537628bed0f3cde08625032ee16 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 13 Aug 2023 15:37:17 -0300 Subject: infra: attempt to make content function imports work on windows --- src/content/dependencies/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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}`; -- cgit 1.3.0-6-gf8a5