diff --git a/src/node/build/buildPluginHtml.ts b/src/node/build/buildPluginHtml.ts
index a6b8b1eeeabc5c..89e7a936f0805b 100644
--- a/src/node/build/buildPluginHtml.ts
+++ b/src/node/build/buildPluginHtml.ts
@@ -4,8 +4,8 @@ import fs from 'fs-extra'
import { isExternalUrl, cleanUrl, isStaticAsset } from '../utils/pathUtils'
import { resolveAsset } from './buildPluginAsset'
import {
- parse,
- transform,
+ parse as Parse,
+ transform as Transform,
NodeTransform,
NodeTypes,
TextNode,
@@ -130,9 +130,11 @@ const compileHtml = async (
inlineLimit: number,
resolver: InternalResolver
) => {
+ const { parse, transform } = require('@vue/compiler-dom')
+
// @vue/compiler-core doesn't like lowercase doctypes
html = html.replace(/