This also aligns the npm loader's constructor to be consistent with other
loaders.
Related to T2134
Note:
It's not tested yet. Just to ensure this is going the right way first.
Note: This cannot pass the ci as it's built against my latest refactoring on
the loader which is not completely in diff (see D2395).