define(“babylonjs”, , factory) with define( , factory)
I guess what happened is that AFTER the above replacement require.js used root[“BABYLON”] = factory();.
My issue now is that I can’t import Babylon GUI babylonjs-gui. The reason definitely is that GUI uses Babylon as a dependancy. So if I replace define(“babylonjs-gui”, [“babylonjs”], factory) with define( [“babylonjs”], factory) I get the error
Cannot read property ‘AdvancedDynamicTexture’ of undefined
Anybody can help on this? Can I webpack Babylon.js with Babylon-GUI in one file to avoid the problem?