const THREE = require('three');
require('three/examples/js/loaders/OBJLoader.js');
Once I imported threejs from node_modules, I decided to utilize the provided OBJLoader, but encountered an unexpected error.
THREE is not defined
at eval (eval at <anonymous> (experiment.js:133), <anonymous>:5:1)
Within the OBJLoader:
THREE.OBJLoader = function ( manager )
The error indicates that Three inside the OBJLoader is not defined even though it was required previously. How should I handle requiring files in this manner?