Open psychobolt opened 1 month ago
If you're using yarn
or patch-package
, you can apply the following patch using the suggestion above:
diff --git a/dist/index.mjs b/dist/index.mjs
index 909ea96b2b4a5d7051690673d946536879e7613e..86706f04f370cbf71f5b628765c04daddca759a6 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -27,7 +27,8 @@ function sassGlobImports(options = {}) {
for (let i2 = 0; i2 < searchBases.length; i2++) {
basePath = searchBases[i2];
files = globSync(path.join(basePath, globPattern), {
- cwd: "./"
+ cwd: "./",
+ windowsPathsNoEscape: true
}).sort((a, b) => a.localeCompare(b, "en"));
const globPatternWithoutWildcard = globPattern.split("*")[0];
if (globPatternWithoutWildcard.length) {
@psychobolt Just wanted to say thank you for flagging this and I apologize for not responding. I've been very tied up with a big project. If you have the ability to test this on linux/windows I would definitely welcome a pull request. Unit tests for windows paths would be great, too!
Issue
There is no error being thrown from Vite, there is a
style.css
file output but has no contents for Windows. For MacOS, works normallyContext:
Downgrading to 3.0.2 resolves my issue.
From latest
glob
README.md:Readme suggests the use of
windowsPathsNoEscape: true
when backslash\
is present in path. However, it may limit special glob characters. A Windows path will resemble double slashes under node:D:\\project\\sub-path\\**\\*.scss
. Futhermore, there are no unit tests for support of Windows paths.