Isolate regexes and hashing logic into TemplatedPathPlugin