How to inject `@babylonjs/ktx2decoder` into Babylon?

Officially, the recommendation is to self‑host any files you rely on from the Babylon CDN, as it’s the best first-line defense against situations like this. From our documentation:

It is not recommended to use the latest CDN version directly in production. Although the Babylon team won’t do it deliberately, it is always possible that something could go wrong during the build or deployment of a specific version, and that the CDN could be updated with some code that will break your production application.

That said, I totally understand that it might not occur to folks to self‑host… at least not until something breaks :sweat_smile:. With that in mind, maybe there is value in having our packages reference versioned CDN URLs by default if it’s simple to do? Not sure yet, but something to think about. cc @docEdub @Deltakosh for thoughts.

2 Likes

Looks do-able. We have similar build scripts already we may be able to repurpose.