Function to create URL relative to a configured base URL
Yes, it's correct to use const here. That would be considered idiomatic Javascript. If you're using const when you shouldn't, you'll notice as it will produce a TypeError.

People coming from other languages might disagree as they think that const means that the variable is constant/immutable (which is not the case, it's just not re-assignable). But that is really a critique of the naming of the keyword, not your usage of the keyword (which is correct).