Hi
I had a problem running Babylon in Magento which uses require.js to import javascript files. The issue was in the UMD definition which I solved (skipped) by replacing the following in the UMD definition 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?
Hi Jacob, this the config solved the issue? Our package defines the package name (“babylonjs”), and it should be set if you want to load other packages that depend on it.
Would be great to know what the error was the made you make the import anonymous