Importing sub modules, or module extensions from .js files using npm packages

I am using THREE js

importing the library like this

import THREE from 'three';

no problem. but the Stats library they use with the code is not included in the module so

import Stats from 'three/examples/js/libs/stats.min.js';

This works too! Example code that extends the library is also not included in the module, like OrbitControls
So when I try importing that one

import OrbitControls from'three/examples/js/controls/OrbitControls.js';

it Fails. with Uncaught ReferenceError: THREE is not defined

Orbit controls simply extends on the THREE object like this:

THREE.OrbitControls = function ( object, domElement ) {

So it expects a THREE object that does not exist in its scope

How could I fix this? is there a way to pass arguments to imports

You could manually import THREE into OrbitControls.js ? Seems like a problem with the npm package you are using, not to do with Meteor specifically.

Thanks for the suggestion. But I would prefer not to since that code is not mantained by me. I was hoping to find a proper way to include by reference and not having to commit the code to my repository.