"import declarations may only appear at top level of a module" for GLTFLoader?

Hello! I apologize if my forum etiquette is off, but I couldn’t find anyone else discussing this issue.
I’m currently working on a 3d virtual gallery, and I’m trying to use GLTFLoader to load a model that resembles the physical space the gallery is in, essentially an architectural model. However, when I try to import GLTFLoader, I get the following error:
Imgur: The magic of the Internet (My computer wouldn’t upload the image itself. Poor bandwidth on my part?)
What bothers me most is that the source of the error appears to be in the GLTFLoader.js module, not any typo in my own program. I understand that this is often not the case, as poor function calls can result in errors getting thrown in the external module, but I don’t see anything that could have caused this issue. This also isn’t the only module I’ve imported from an external webpage; I also imported OrbitControls.js and DragControls.js.
Let me send the file I’m currently using. I’m new to THREE.js, so I had already programmed it to display an icosahedron to familiarize myself with the orbit controls.
Edit fiddle - JSFiddle - Code Playground

Import the GLTFLoader.js from the js subdirectory, not the jsm subdirectory, like so:

<script src="https://threejs.org/examples/js/loaders/GLTFLoader.js"></script>
                                          ^^

Then invoke the loader this way, and there are no error messages any more:

const loader = new THREE.GLTFLoader();

This worked, thank you!