Commit 6e67fb5f by Li Kui Committed by GitHub

fix(@vben/docs): build failed on windows (#4362)

1 parent 3697f6bc
...@@ -47,7 +47,10 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => { ...@@ -47,7 +47,10 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => {
const regex = /<DemoPreview[^>]*\sdir="([^"]*)"/g; const regex = /<DemoPreview[^>]*\sdir="([^"]*)"/g;
// Iterate through the Markdown content and replace the pattern // Iterate through the Markdown content and replace the pattern
state.src = state.src.replaceAll(regex, (_match, dir) => { state.src = state.src.replaceAll(regex, (_match, dir) => {
const componentDir = join(process.cwd(), 'src', dir); const componentDir = join(process.cwd(), 'src', dir).replaceAll(
'\\',
'/',
);
let childFiles: string[] = []; let childFiles: string[] = [];
let dirExists = true; let dirExists = true;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!