This could be solved by cloning the defaultResolverConfig object and marking it as const, or just moving the defaultResolver definition inside of the function. As-is, this bug will cause many 404s for ...