I have now made it so that globalise will work as intended when it is included as a dependancy to another node module. It will still globalise all the core node modules and it will still globalise the applications top level node_modules folder. But it will now also globalise the node_modules folder of it's dependant.