Problem using GLTFExporter

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

Here’s my sandbox: https://codesandbox.io/s/three-js-forked-9llhnf?file=/src/index.js:648-653
https://9llhnf.csb.app/
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";

use

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

GLTFExporter has no default export.

1 Like