Add regex hooks to fix require define paths