Problem using GLTFExporter

I get an error when using the GLTFExporter
Uncaught TypeError: _GLTFExporter.default is not a constructor
at (index.js? [sm]:117:20)

Here’s my sandbox:
Possible a typescript problem but I’m just trying to add it to a vanilla js sandbox that I forked.
I can’t figure out how to import in a way that I can use the constructor.

Instead of:

import GLTFExporter from "three/examples/jsm/exporters/GLTFExporter";


import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js';

GLTFExporter has no default export.

1 Like