-
Notifications
You must be signed in to change notification settings - Fork 40
css-loader can't handle paths with spaces #22
Comments
This might be related: #18 |
It looks like it is, so it might not be Vite-related, after all. In which case, we have another type of project that confirms the bug. |
I also get the |
Yep, had this same issue using Laravel Mix: https://gist.github.com/johnnytest4real/6036e55bee447c2cc9b774a67b1345e0 |
Confirmed on Windows and a very basic config. Directories with spaces doesn't work. |
Yes, I confirm this issue. Windows, Node 14.16.0. Although, it doesn't work for me even after that because of the Infinite loop error in next.js |
So the issue is with these two lines tailwindcss-jit/src/lib/setupContext.js Lines 186 to 187 in dfb1a3d
Can be fixed by decoding the URI (I'm not really sure why in here url.parse is used to get the pathname of a directory tho 🤔 ) let pathname = url.parse(file).pathname
let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs Or by just by passing the let newModified = fs.statSync(file).mtimeMs |
@anuraghazra Great. I think you can create a pull-request with your proposal maybe? So, you can discuss this with the official team. |
Hey!
If the project is in a folder that has a space in its name anywhere along the path, css-loader breaks, but without spaces it works (that should teach me for using spaces, I know 😅):
Using
tailwindcss
inpostcss.config.js
also works properly, with and without spaces.The same thing happens in any kind of project (reproduced it in Next.js, and in razzle.js).
The text was updated successfully, but these errors were encountered: