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

Temp file cleanup on Windows

Open nobrayner opened this issue 3 years ago • 1 comments

~~I was working on a project on a Windows machine, with the source code stored under C:\d\project, and upon trying to use this plugin, found that it was generating bad temp file paths along the lines of C:\Users\d\project\date-filename.css~~

~~To explore this a bit further, I then moved the project code to be located in C:\Users\username\d\project, which then started working - albeit with a still incorrect temp file location of C:\Users\username\AppData\d\project\date-filename.css (the temp path for Windows is C:\Users\username\AppData\Local\Temp)~~

I hadn't set the rootDir property in the plugin, so it was using process.cwd() with... Interesting results 🤦‍♂️

~~As part of playing around with this, I also found that~~ Windows does not automatically clean up temp files, and the developer is expected to clean these files up themselves (ref: https://superuser.com/a/296827)

nobrayner avatar May 15 '21 05:05 nobrayner

I dont't use windows, but if you create a PR, I can totally take a look at it :D

martonlederer avatar May 20 '21 16:05 martonlederer