diff --git a/packages/vite/src/node/server/middlewares/indexHtml.ts b/packages/vite/src/node/server/middlewares/indexHtml.ts index 180f14a6562cd2..85f588a3f1527c 100644 --- a/packages/vite/src/node/server/middlewares/indexHtml.ts +++ b/packages/vite/src/node/server/middlewares/indexHtml.ts @@ -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) } }), )