These files are ES Modules, and should be compatible with ESBuild (in most configurations at least). For a better answer I think you may need to share more details, e.g. complete imports and the build tool configuration, tsconfig if applicable, etc. Any way to reproduce the issue. I assume three.js was installed with npm?
You might also try:
- include
.js
extension on imports, e.g.three/examples/jsm/loaders/GLTFLoader.js
three/addons/...
instead ofthree/examples/jsm/...
… this is an alias usingpackage.json#exports
, some bundlers support the alias and others do not.