Hello!
I am trying to import GLTFExporter into my Vue 2 project, using the latest version from npm.
Three works fine, but the exporter… not so much.
import * as THREE from 'three'
import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js'
No matter what I do, I get an error of “You may need an appropriate loader to handle this file type.”
the error:
Module parse failed: Unexpected token (749:33)
You may need an appropriate loader to handle this file type.
| console.warn( 'THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.' );
|
| const metalness = metalnessMap?.image;
| const roughness = roughnessMap?.image;
everything else from the examples folder I tested seems to work. I also noticed that this error happens on google model-viewer, and breaks the import as well. anyone knows what might be the problem? Is there a specific loader? I already have file-loader for glb files on my webpack.config.