From 010e034ca1a32424acad9b26bc323d45bb237ece Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 9 Jan 2024 10:57:16 -0800 Subject: [PATCH] fix(hmr): update worker import transform for vite 5 --- src/coalesce-vue/src/build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coalesce-vue/src/build.ts b/src/coalesce-vue/src/build.ts index 88f1cea13..3ae4b24cc 100644 --- a/src/coalesce-vue/src/build.ts +++ b/src/coalesce-vue/src/build.ts @@ -371,7 +371,7 @@ export function createAspNetCoreHmrPlugin({ // * new Worker("https:// // where the URL is the vite server new RegExp( - `(new\\s+(?:Shared)?Worker\\s*\\(\\s*(?:new\\s+URL\\s*\\(\\s*)?)(["'])https?://[^:]+:${port}${escapeRegex( + `(new\\s+(?:Shared)?Worker\\s*\\(\\s*(?:new\\s+URL\\s*\\(\\s*)?)(?:''\\s*\\+\\s*)?(["'])https?://[^:]+:${port}${escapeRegex( base )}`, "g"