-
Notifications
You must be signed in to change notification settings - Fork 28
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
Incorrect source paths generated in the CSS when used under Windows. #15
Comments
Thanks, done |
This change causes the following error:
|
You're probably using an old version of Node, |
Is v5.10.1 old? When I replace "path.posix.join" with "path.join" it works. |
v5.10.1 isn't old, however Are you definitely loading the built-in |
It works for me using Node v5.10.1 and NPM v3.8.6 on Arch Linux - what distro are you using? |
I am on Windows 10 and it only works when I remove posix. |
|
Ok - I've no idea then. I'll leave the |
Are you definitely loading the built-in |
|
You're probably not using the built-in if it's listed in |
ok, let me correct that. |
Same thing. |
Have you removed the external |
When you've removed it completely, the plugin will work, as you're using the same version of Node as me |
I ran |
I also ran |
So I am the only one having this issue? But |
Apparently. If you were loading the built-in |
When using this under Windows, the CSS generated has incorrect source paths. I tracked the problem down to this function:
function makeFontFace(request) {
request.name = path.join(options.fontsDir, request.name);
return template
.replace(/$(\w )/g, function (m, name) { return request[name]; });
}
The error is that 'path' will use the local system's path separator when joining path elements. The end result is that the web server treats the Windows '' as an escape character, and returns that there is no such file when trying to access the woff file. (Even when running under Windows.)
The fix is to change the path join statement to the following.
This will always use the '/' when joining the path elements, and will produce the correct source URL path in the CSS.
The text was updated successfully, but these errors were encountered: