-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sass.node.js overoptimized ... #122
Comments
thiscantbeserious
added a commit
to thiscantbeserious/sass.js
that referenced
this issue
Apr 8, 2019
do you want to send a PR for that? |
Done :) |
rodneyrehm
pushed a commit
that referenced
this issue
May 19, 2019
This is fixed in release 0.11.0. thanks for your support! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per #88 you overdid it a little by hard-replacing the resolver path return value with
.replace(/\\/g, '/');
infunction resolve(request) { ... }
path.normalize does already return the correct normalized path for the specific target environment
The only reason a path like C:/browser/test.txt works with many modern browsers is because they actually parse it with the Posix syntax (and their file:// protocol implementation). Technically those paths are incorrect everywhere else - like in NPM and will return a file not found error (like it currently does e.g. when used in conjunction with Gulp on Windows, where all @import rules fail).
Most if not all browser correctly unwrap paths like C:\test\file.txt to their correct syntax the browser expects, in this case "file://C:/test/file.txt".
So the correct solution should be to simply return the value that path.normalize returns without any hard replace applied.
Sorry for the long text, I hope it makes sense.
The text was updated successfully, but these errors were encountered: