File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -289,13 +289,16 @@ function VitePluginInspector(options: VitePluginInspectorOptions = DEFAULT_INSPE
289289 }
290290 const htmlDir = path . dirname ( resolved )
291291 let match : RegExpExecArray | null
292+ scriptModuleSrcRE . lastIndex = 0
292293 // eslint-disable-next-line no-cond-assign
293294 while ( ( match = scriptModuleSrcRE . exec ( html ) ) !== null )
294295 resolveEntryModule ( match [ 1 ] , htmlDir )
296+ scriptModuleInlineRE . lastIndex = 0
295297 // eslint-disable-next-line no-cond-assign
296298 while ( ( match = scriptModuleInlineRE . exec ( html ) ) !== null ) {
297299 const scriptContent = match [ 2 ]
298300 let importMatch : RegExpExecArray | null
301+ importRE . lastIndex = 0
299302 // eslint-disable-next-line no-cond-assign
300303 while ( ( importMatch = importRE . exec ( scriptContent ) ) !== null )
301304 resolveEntryModule ( importMatch [ 1 ] , htmlDir )
You can’t perform that action at this time.
0 commit comments