diff options
author | 2023-10-27 11:45:02 +0200 | |
---|---|---|
committer | 2023-10-27 17:45:02 +0800 | |
commit | 01c801108f1f5429436e4fc930018bf96ed31f79 (patch) | |
tree | 8fd6273aebe6a19336cdce4c21f0411ffa7b3848 /packages/integrations/markdoc/src | |
parent | 35c5265dc2b1e5940e14eebc50c7ccff98fe5f3b (diff) | |
download | astro-01c801108f1f5429436e4fc930018bf96ed31f79.tar.gz astro-01c801108f1f5429436e4fc930018bf96ed31f79.tar.zst astro-01c801108f1f5429436e4fc930018bf96ed31f79.zip |
Fix: Markdoc Integration build when root folder contains spaces (#8759)
Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/markdoc/src')
-rw-r--r-- | packages/integrations/markdoc/src/content-entry-type.ts | 4 |
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`; } |