Closed timostamm closed 3 years ago
Amazing, happy to see this fixed. I'll test this today :)
Awesome, looking forward!
Sorry for the wait. I messed up some stuff so I'll be merging this from #18
Small question, it seems that in watch
mode, [esbuild-css-modules-plugin] Clean temp files...
is constantly triggered, any idea what could cause this?
Sorry, no, but I'm happy to take a look at a PR if you figure out anything
Thinking out loud: watch mode may be triggered every time a temp file is created in the working directory, so we might need to create them somewhere else, and not just next to their original file.
I will clone the plugin and see if it's that or something else. 👍
You're probably right 🤔
For the example at the top, /var/folders/rw/dlkdb0bn74j4j0wgp_q233qc0000gn/T/xxx/xxx/xxx/1628683474625-xxx.module.css
did exist in the file system after the build failure (and contained the expected content).
Hey Marton, thanks for this plugin!
We ran into an issue while using CSS modules. esbuild fails intermittently with an error message like
Could not resolve "/var/folders/rw/dlkdb0bn74j4j0wgp_q233qc0000gn/T/xxx/xxx/xxx/1628683474625-xxx.module.css"
.esbuild is looking for the build artifact
1628683474625-xxx.module.css
by listing directory entries. The file does exist at this point, but esbuild is unable to find it among other directory entries. This appears to be issue evanw/esbuild#1101 (though the mentioned workaroundexport GODEBUG=asyncpreemptoff=1
did not work for us).This PR makes sure those artifacts are always the single entry in a unique temp directory, which fixes the issue for us.