pull/4525/head
Divyansh Singh 7 months ago
parent d35e7c7338
commit 9d60ad1028

@ -372,10 +372,7 @@ export async function createVitePressPlugin(
if (file === configPath || configDeps.includes(file)) { if (file === configPath || configDeps.includes(file)) {
siteConfig.logger.info( siteConfig.logger.info(
c.green( c.green(
`${path.relative( `${path.relative(process.cwd(), file)} changed, restarting server...\n`
process.cwd(),
file
)} changed, restarting server...\n`
), ),
{ clear: true, timestamp: true } { clear: true, timestamp: true }
) )

@ -114,9 +114,7 @@ export const staticDataPlugin: Plugin = {
idToLoaderModulesMap[id] = { watch, load } idToLoaderModulesMap[id] = { watch, load }
} }
const result = `export const data = JSON.parse(${JSON.stringify( const result = `export const data = JSON.parse(${JSON.stringify(JSON.stringify(data))})`
JSON.stringify(data)
)})`
if (_resolve) _resolve(result) if (_resolve) _resolve(result)
return result return result

Loading…
Cancel
Save