Unable to load GLB file into ZapWorks ThreeJS template

I used zapworks init to create a starter project. This worked great. But then I added the GLTFLoader to load a model. This doesn’t work in the ZapWorks template. I get the following error:

Uncaught SyntaxError: Cannot use import statement outside a module - GLTFLoader.js: 1
zappar-threejs.js:1 Zappar for ThreeJS v0.3.33
zappar-threejs.js:1 Zappar JS v0.3.15
zappar-threejs.js:1 Zappar CV v0.3.14
index.js:46 Uncaught ReferenceError: GLTFLoader is not defined
at index.js:46

I’m guessing the problem is because the ZapWorks project doesn’t use module syntax.

Hi @gweinfurther ,

It looks like you’re missing a GLTFLoader. Perhaps try constructing it as THREE.GLTFLoader.

It would be helpful if you could share some code to replicate your issue.