Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return callback(error)
}
generatedContent = generatedContent.toString()
var content = generatedContent
var filepath = options.generatedFilePath
if (typeof options.sourceMapPath === 'string') {
content = null
filepath = options.sourceMapPath
}
var resolveOptions = {
sourceRoot: options.sourceRoot
}
sourceMapResolve.resolve(
content, filepath, fs.readFile, resolveOptions,
function (error, result) {
if (error) {
return callback(error)
}
if (result === null) {
return callback(
new Error('No sourceMappingURL found in ' + filepath)
)
}
result.generatedContent = generatedContent
callback(null, result)
}
)
})
}