From 6d4a81c74d4d66628f1be820ec5fa7e0defffec1 Mon Sep 17 00:00:00 2001 From: hamflx Date: Tue, 29 Oct 2024 17:40:18 +0800 Subject: [PATCH] Fix the issue of unintended escaping of the import statement for insertStyle.js. --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5cc4989..ae0244d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -151,7 +151,7 @@ const processRenderResponse = ( * *.css into *.html `head`. * @see insertStyle.ts for additional information */ - imports = `import ${insertFnName} from '${__dirname}/insertStyle.js';\n`; + imports = `import ${insertFnName} from '${__dirname.replace(/\\/g, '/')}/insertStyle.js';\n`; defaultExport = `${insertFnName}(${out});`; } else if (!rollupOptions.output) { defaultExport = out;