Okay, fixed the require() detection
Now uses require.alias calls as a first port of call for resolving modules which fixed a bug.