File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,12 @@ export async function createMarkdownToVueRenderFn(
55
55
file : string ,
56
56
publicDir : string
57
57
) : Promise < MarkdownCompileResult > => {
58
+ const fileOrig = file
58
59
const alias =
59
60
siteConfig ?. rewrites . map [ file ] || // virtual dynamic path file
60
61
siteConfig ?. rewrites . map [ file . slice ( srcDir . length + 1 ) ]
61
62
file = alias ? path . join ( srcDir , alias ) : file
62
63
const relativePath = slash ( path . relative ( srcDir , file ) )
63
- const dir = path . dirname ( file )
64
64
const cacheKey = JSON . stringify ( { src, file } )
65
65
66
66
const cached = cache . get ( cacheKey )
@@ -85,6 +85,7 @@ export async function createMarkdownToVueRenderFn(
85
85
let includes : string [ ] = [ ]
86
86
src = src . replace ( includesRE , ( m , m1 ) => {
87
87
try {
88
+ const dir = path . dirname ( fileOrig ) // include paths are strict relative file paths w/o aliases
88
89
const includePath = path . join ( dir , m1 )
89
90
const content = fs . readFileSync ( includePath , 'utf-8' )
90
91
includes . push ( slash ( includePath ) )
You can’t perform that action at this time.
0 commit comments