File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
packages/vite/src/node/server/middlewares Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -188,17 +188,18 @@ const devHtmlHook: IndexHtmlTransformHook = async (
188188 }
189189 } )
190190
191- for ( let index = 0 ; index < styleUrl . length ; index ++ ) {
192- const { start, end, code } = styleUrl [ index ]
193- const url = filename + `?html-proxy&${ index } .css`
191+ await Promise . all (
192+ styleUrl . map ( async ( { start, end, code } , index ) => {
193+ const url = filename + `?html-proxy&${ index } .css`
194194
195- // ensure module in graph after successful load
196- const mod = await moduleGraph . ensureEntryFromUrl ( url , false )
197- ensureWatchedFile ( watcher , mod . file , config . root )
195+ // ensure module in graph after successful load
196+ const mod = await moduleGraph . ensureEntryFromUrl ( url , false )
197+ ensureWatchedFile ( watcher , mod . file , config . root )
198198
199- const result = await server ! . pluginContainer . transform ( code , url )
200- s . overwrite ( start , end , result ?. code || '' )
201- }
199+ const result = await server ! . pluginContainer . transform ( code , url )
200+ s . overwrite ( start , end , result ?. code || '' )
201+ } )
202+ )
202203
203204 html = s . toString ( )
204205
You can’t perform that action at this time.
0 commit comments