pull/4525/head
Divyansh Singh 7 months ago
parent 24727af4e8
commit 689984da34

@ -172,14 +172,15 @@ export const dynamicRoutesPlugin = async (
}
}
if (modules.size || watchedFileChanged) {
if (
(modules.size && !normalizedFile.endsWith('.md')) ||
watchedFileChanged
) {
// path loader module or deps updated, reset loaded routes
if (!normalizedFile.endsWith('.md') || watchedFileChanged) {
Object.assign(
config,
await resolvePages(config.srcDir, config.userConfig, config.logger)
)
}
Object.assign(
config,
await resolvePages(config.srcDir, config.userConfig, config.logger)
)
}
return modules.size ? [...existingMods, ...modules] : undefined

Loading…
Cancel
Save