From 22e0cd25524d9d4ffda0868eeecc13fe07a7435f Mon Sep 17 00:00:00 2001 From: Aditya Singh Date: Mon, 10 Jun 2024 16:11:20 +0200 Subject: [PATCH] CAPI-235(fix): css not injected in esm build --- esbuild/injectCSSPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esbuild/injectCSSPlugin.js b/esbuild/injectCSSPlugin.js index 08ef4a5..8883a41 100644 --- a/esbuild/injectCSSPlugin.js +++ b/esbuild/injectCSSPlugin.js @@ -50,7 +50,7 @@ export const injectCSSPlugin = baseDir => { return; } const regex = - /(\w+)\.id="anyline-guidance-sdk-style",\1\.textContent=""/; + /([$\w]+)\.id="anyline-guidance-sdk-style",\1\.textContent=""/; const replacement = `$1.id="anyline-guidance-sdk-style",$1.textContent=\`${allCSS}\``; const updatedData = data.replace(regex, replacement); fs.writeFile(filePath, updatedData, 'utf8', err => {