File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,8 @@ export async function createVitePressPlugin(
307
307
if ( url ?. endsWith ( '.html' ) ) {
308
308
res . statusCode = 200
309
309
res . setHeader ( 'Content-Type' , 'text/html' )
310
- let html = `<!DOCTYPE html>
310
+ let html = `\
311
+ <!DOCTYPE html>
311
312
<html>
312
313
<head>
313
314
<title></title>
Original file line number Diff line number Diff line change @@ -187,10 +187,17 @@ export const dynamicRoutesPlugin = async (
187
187
188
188
// Also check if the file matches any custom watch patterns.
189
189
let watchedFileChanged = false
190
- for ( const [ , route ] of routeModuleCache ) {
190
+ for ( const [ file , route ] of routeModuleCache ) {
191
191
if ( route . watch && isMatch ( normalizedFile , route . watch ) ) {
192
192
route . routes = undefined
193
193
watchedFileChanged = true
194
+
195
+ for ( const id of moduleGraph . delete ( file ) ) {
196
+ const mod = this . environment . moduleGraph . getModuleById ( id )
197
+ if ( mod ) {
198
+ modules . push ( mod )
199
+ }
200
+ }
194
201
}
195
202
}
196
203
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ export const staticDataPlugin: Plugin = {
150
150
const loader = idToLoaderModulesMap [ id ]
151
151
if ( loader && loader . watch && isMatch ( normalizedFile , loader . watch ) ) {
152
152
const mod = this . environment . moduleGraph . getModuleById ( id )
153
- if ( mod && ! modules . includes ( mod ) ) {
153
+ if ( mod ) {
154
154
modules . push ( mod )
155
155
}
156
156
}
You can’t perform that action at this time.
0 commit comments