Use the pathResolverContext hook in JSPlatform.