esbuild-plugin-html icon indicating copy to clipboard operation
esbuild-plugin-html copied to clipboard

Bug: entryPoints with Windows \ paths don't work

Open cinderblock opened this issue 1 year ago • 1 comments

If you're on Windows, and your entryPoints contain Windows's path character \, which work for esbuild, they won't match up with esbuild's internal naming. So nothing gets injected to the output html.

A simple fix is:

htmlPlugin({
  files: [
    {
      entryPoints: process.platform == 'win32' ? entryPoints.map(e => e.replaceAll('\\', '/')) : entryPoints,
      // ...
    },
  ],
}),

cinderblock avatar Sep 26 '24 08:09 cinderblock

Thanks for reporting this! I'm not super experienced with software development on windows anymore, but I'll see if I can reproduce this somehow.

craftamap avatar Oct 05 '24 21:10 craftamap