My answer is still correct
add import "@babylonjs/loaders/glTF" to the import section and it will work.
import "@babylonjs/loaders/glTF"