A utility function to resolve a path in a number of ways while taking into account the url, trailingSlash and baseURL
config.
import { createSitePathResolver } from '#imports'
const resolvePath = createSitePathResolver({
canonical: true,
})
resolvePath('/about')
// https://www.example.com/about
canonicalbooleantrueShould the path be resolved to the canonical URL using the site config url.
When false, it will resolve to the request host using getNitroOrigin.
absolutebooleanfalseShould the path be resolved to an absolute URL.
withBasebooleanfalse