How to get GLTFLoader work in browser (Typescript + Three.js)

BTW. This page (bottom of the page) describes how modules (like GLTFLoader?) can be imported. Seems like this works only for JS projects then? This is what I used too…

https://threejs.org/docs/#manual/en/introduction/Import-via-modules

This is the exact line I have now:

import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';

And this will error when trying to run Browserify manually like this, on tsc generated JS files:

browserify build/main.js -o build/bundle.js

However, I just modified this from Browserify’s main page example, no idea if there are some settings.