Skip to content

Commit

Permalink
Merge pull request #168 from hamflx/main
Browse files Browse the repository at this point in the history
Fix the compatibility issue of import statements on Windows.
  • Loading branch information
elycruz authored Oct 30, 2024
2 parents ee6f5e1 + 6d4a81c commit ebb8035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ebb8035

Please sign in to comment.