Closed minhtranite closed 8 years ago
I thought this was fixed in #73 / #74. What versions of Favicons / Gulp-Favicons are you using?
You can see more info here.
I think bug come from line:
https://github.com/haydenbleasel/favicons/blob/master/helpers.js#L42.
When call replace it replace //
by /
.
It better than replace two time.
...
function relative (directory) {
return path.join(options.path, directory).replace(/\\/g, '/');
}
function absolute (directory) {
return path.join(options.url, relative(directory));
}
...
My mistake :(
I think this is also due to path.join
which is meant to be url.resolve
(to preserve the double slashes). This keeps reverting in new commits so I'll need to make sure this is fixed.
Fixed in favicons@4.5.2
I'm using version 4.8.6
and still seeing this. I'm not using Gulp -- just using the code in my own app directly.
To reproduce, just pass a URL in the path
option, like this: 'http://example.com'.
Workaround is to use a base URL like this: 'http:\\\\example.com' -- stupid ugly and confusing, but works.
I think url shoud be
http://localhost:3000
instead ofhttp:/localhost:3000