Currently, I am attempting to bring in the threejs and GLTFLoader modules into my project. Both of these modules (just for testing purposes) are located within the same root/js/ directory.
import * as THREE from './js/build/three.module.js'; // Importing THREE module works without any issues
import { GLTFLoader } from './js/build/GLTFLoader.js'; // Attempting to import GLTFLoader throws a MIME TYPE error
I understand that there is a mimetype problem, however, it's strange that this error does not occur when using the standard three master 'structure'. Can anyone explain why this doesn't work?
EDIT:
Upon uncommenting the GLTF import line, the following error message is displayed:
Loading module from “http://localhost/dev/project/build/three.module.js”
was blocked because of a disallowed MIME type (“text/html”).
The issue seems to be related to the path of three.module.js file, but surprisingly everything loads correctly with no errors when this line is commented out. Rest assured, all paths for files and folders are accurate.