I was running into an empty stream when passing an absolute path as my searchPath. I kind of expected gulp-useref not to fail silently on an empty glob result, but anyway, the reason why it doesn't work is this call to path.join() (and presumably the one a few lines higher too).
Would changing that call to a path.resolve() break anything? In my case, it worked fine.
As a workaround, I used path.relative(__dirname, dir) to get a relative path, but supporting absolute paths seems like a useful feature.
I was running into an empty stream when passing an absolute path as my
searchPath
. I kind of expected gulp-useref not to fail silently on an empty glob result, but anyway, the reason why it doesn't work is this call topath.join()
(and presumably the one a few lines higher too).Would changing that call to a
path.resolve()
break anything? In my case, it worked fine.As a workaround, I used
path.relative(__dirname, dir)
to get a relative path, but supporting absolute paths seems like a useful feature.