import LocationUtils from "../../utils/location" ; import fileToURL from "./fileToURL" ; param { Output } output param { string } filePath return { string } function resolveFileToURL ( output , filePath ) { filePath = LocationUtils . toAbsolute ( filePath , "" , "" ) ; const page = output . getPage ( filePath ) ; if ( page ) { filePath = fileToURL ( output , filePath ) ; } return LocationUtils . normalize ( filePath ) ; } export default resolveFileToURL ;