fix: broken rewrites on windows (#4268)

pull/4274/head
Heptazhou 11 months ago committed by GitHub
parent 3e8fc40c36
commit b46d6d3a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -63,14 +63,14 @@ export async function createMarkdownToVueRenderFn(
const dynamicRoutes = new Map( const dynamicRoutes = new Map(
siteConfig?.dynamicRoutes?.routes.map((r) => [ siteConfig?.dynamicRoutes?.routes.map((r) => [
r.fullPath, r.fullPath,
path.join(srcDir, r.route) slash(path.join(srcDir, r.route))
]) || [] ]) || []
) )
const rewrites = new Map( const rewrites = new Map(
Object.entries(siteConfig?.rewrites.map || {}).map(([key, value]) => [ Object.entries(siteConfig?.rewrites.map || {}).map(([key, value]) => [
path.join(srcDir, key), slash(path.join(srcDir, key)),
path.join(srcDir, value!) slash(path.join(srcDir, value!))
]) || [] ]) || []
) )

Loading…
Cancel
Save