TypeError: BABYLON.Engine is not a constructor

We do not have a es6 bundle, you could try using require instead ? or loading a script this way ?

const loadScriptAsync = function (url, instantResolve) {
    return new Promise((resolve) => {
        const urlToLoad = "yourURL";
        const script = document.createElement("script");
        script.src = urlToLoad;
        script.onload = () => {
            resolve();
        };
        script.onerror = (e) => {
            reject(e);
        };
        document.head.appendChild(script);
    });
};
1 Like