I am trying to import the threejs and GLTFLoader modules, both of which ( for testing ) are in the same root/js/ folder..
import * as THREE from './js/build/three.module.js'; // Works fine
import { GLTFLoader } from './js/build/GLTFLoader.js'; // Throws a disallowed MIME TYPE error
I get the mimetype issue but the error isn't thrown when in the three master 'structure', so why doesn't this work?
EDIT:
So when uncommenting the import GLTF line, the error thrown is the following:
Loading module from “http://localhost/dev/project/build/three.module.js”
was blocked because of a disallowed MIME type (“text/html”).
It seems to refer to the three.module.js path, however, when that line is commented out, it all loads fine with no errors. The paths are correct for all files/folders too.