I have this import that works
import { dirname, default as path } from 'path';
but I don't understand why it needs to be declared this way, instead of
import { dirname, path } from 'path';
import { dirname, * as path } from 'path';
I had a look at examples in Can you import node's path module using import path from 'path' and none suggested the variant above that actually works.
Can someone please explain why it needs to be imported specifically with 'default' and also if this is the best way to import these two modules together.