summaryrefslogtreecommitdiff
path: root/packages/integrations/markdoc/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/markdoc/src')
-rw-r--r--packages/integrations/markdoc/src/content-entry-type.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts
index f682e114f..07c5268e4 100644
--- a/packages/integrations/markdoc/src/content-entry-type.ts
+++ b/packages/integrations/markdoc/src/content-entry-type.ts
@@ -106,7 +106,7 @@ export async function getContentEntryType({
import { createGetHeadings, createContentComponent } from '@astrojs/markdoc/runtime';
${
markdocConfigUrl
- ? `import markdocConfig from ${JSON.stringify(markdocConfigUrl.pathname)};`
+ ? `import markdocConfig from ${JSON.stringify(fileURLToPath(markdocConfigUrl))};`
: 'const markdocConfig = {};'
}
@@ -230,7 +230,7 @@ function getStringifiedImports(
? `{ ${config.namedExport} as ${componentNamePrefix + toImportName(key)} }`
: componentNamePrefix + toImportName(key);
const resolvedPath =
- config.type === 'local' ? new URL(config.path, root).pathname : config.path;
+ config.type === 'local' ? fileURLToPath(new URL(config.path, root)) : config.path;
stringifiedComponentImports += `import ${importName} from ${JSON.stringify(resolvedPath)};\n`;
}