diff --git a/src/index.ts b/src/index.ts
index b36657d..f5c5fd5 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -27,7 +27,7 @@ const defaultConfig = { useRecommendedBuildConfig: true, removeViteModuleLoader:
export function replaceScript(html: string, scriptFilename: string, scriptCode: string, removeViteModuleLoader = false): string {
const reScript = new RegExp(``)
// we can't use String.prototype.replaceAll since it isn't supported in Node.JS 14
- const preloadMarker = /"__VITE_PRELOAD__"/g
+ const preloadMarker = /"?__VITE_PRELOAD__"?/g
const newCode = scriptCode.replace(preloadMarker, "void 0")
const inlined = html.replace(reScript, (_, beforeSrc, afterSrc) => ``)
return removeViteModuleLoader ? _removeViteModuleLoader(inlined) : inlined