In my app I use this imports:
import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera';
import { Engine } from '@babylonjs/core/Engines';
import { SceneLoader } from '@babylonjs/core/Loading/sceneLoader';
import { Color4, Vector3 } from '@babylonjs/core/Maths/math';
import { Scene } from '@babylonjs/core/scene';
import '@babylonjs/loaders/glTF/2.0/glTFLoader';
package.json:
{
"dependencies": {
"@babylonjs/core": "^4.0.3",
"@babylonjs/loaders": "^4.0.3",
"core-js": "^2.6.10",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@types/node": "~8.10.59",
"ts-node": "~7.0.1",
"tslint": "~5.18.0",
"typescript": "~3.5.3"
}
}
I look at code coverage tool in Google Chrome DevTools:
As I know this class or function is part of the @babylonjs/core/Materials
.
And I think it should not be in build if I dont use it directly. Is it correct?
After simple research I found what function body inclunde when I use: import '@babylonjs/loaders/glTF/2.0/glTFLoader';
If remove this import then function body is empty but still here:
Sorry if it is not a bug.