From within useref custom block handlers I need access to the _basePath variable which gulp-useref uses as vfs.glob base, so that I can push files to the stream and they will be output identically to useref internal blocks.
import: function importer (content, target, options, alternateSearchPath, basePath) {
//...
let file = new vinyl({
base: basePath,
path: target,
contents: buffer,
})
stream.push(file)
return `<script src="${target}"></script>`
}
From within useref custom block handlers I need access to the _basePath variable which gulp-useref uses as vfs.glob base, so that I can push files to the stream and they will be output identically to useref internal blocks.