Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/vite/src/node/server/middlewares/indexHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,13 @@ const devHtmlHook: IndexHtmlTransformHook = async (
})

// invalidate the module so the newly cached contents will be served
const clientModuelGraph = server?.environments.client.moduleGraph
if (clientModuelGraph) {
const clientModuleGraph = server?.environments.client.moduleGraph
if (clientModuleGraph) {
await Promise.all(
inlineModulePaths.map(async (url) => {
const module = await clientModuelGraph.getModuleByUrl(url)
const module = await clientModuleGraph.getModuleByUrl(url)
if (module) {
clientModuelGraph.invalidateModule(module)
clientModuleGraph.invalidateModule(module)
}
}),
)
Expand Down
Loading